Topic: Using Content Licenses in Kete

Topic type:

When you install Kete or upgrade from 1.0 to a later version, you can use these steps to install licenses, set a default site license, bulk update the content licenses on the site, and notify contributors of the licensing functionality.

Originally written by Kieran Pilkington, Kete Developer for Katipo Communications, Ltd.

An appendix to the Installation Guide



Due to possible copyright violations by changing licenses, make sure you do one of two things. Either:

  • Change everything on the site to the same license as described in the Terms and Conditions of your site if you have one


  • Update the licenses only on content you created and are the only contributor to - or - have permission from all contributors of the content item to change

It's wise to let the content creators set their own licenses. See the section "Notifying Contributors" on how to do this. For content you have permission to license, see the section "Updating content licenses"

On Choosing Licenses

Different sites will have different needs depending the site's use. A Kete site for a corporation where only employees can add material may want only to have a standard "CopyRight X Corp" license for all its material, while a community site that takes items from anyone may want to give the contributing user the power to choose from a variety of license options to closely reflect their wishes for sharing.

Kete's ability to manage available licenses allow for quite a bit of flexibility and can handle these extremes. Site administrators can tailor the available license options to their site's needs.

If sharing material is priority for your site you may want to consider Creative Commons. Kete includes the ability to easily provide NZ and AU (hopefully more jurisdictions in the future) Creative Commons licenses for your users (see Adding Licenses). If you aren't familiar with Creative Commons, the "A Shared Culture" video by Jesse Dylan below gives some background:

Site wide License and Copyright options

By default Kete refers to the Terms and Conditions topic as the site's license. Editing the legal terms outlined in this topic may be sufficient for many sites. Alternatively, you may put a notice of a site wide copyright or license in the site's "footer".

Adding Licenses

As of Kete 1.2, you can install licenses via the licenses administration page that site admins have access to. If you're using Kete 1.1 or earlier, see an older version of this topic.

Once you've upgraded to Kete 1.2 or later, you can install some licenses that can be used when content is made. To do so:

  1. go to the licenses controller by clicking 'administer licenses' in the Administrators Toolbox when logged in as a site admin.
  2. select a license type from the dropdown under the heading "Import Licenses" and select "Import". The licenses will be available for use within a few seconds.

Setting the sites default license

The default license selected for new content when you install/upgrade to Kete is the first one to be installed, which in the case of the NZ CC licenses is likely the CC Attribution-Noncommercial 3.0 NZ License. If this suits what you want, then skip this step. However if you'd like to switch to another license, it's quick and easy to do so.

  • Navigate to "Administrators Toolbox" > "reconfigure site" > "Advanced Options" > "Server" > "Default Content License"
  • Set the field to the id of the license you want to be the default. If you don't know it, you can get the id on the licenses administration page (the number under the heading of 'Id')
  • Once filled in, click Save, and restart your application.

And that's it. The default license is now changed. You can change it using the steps above as many times as you like.

Updating content licenses

If you have a lot of content on the site, that would take > 10 mins to update, then it's worth bulk updating it. It saves time, and works just as well. There are some simple commands you can run to do just this. Open a new console, load up "script/console production", and run the following commands (change only the first two lines to set which license and include usernames you have permission to update).

logins = ['admin']
new_license_id = 4
# dont change past here
logins.collect! { |login| user = User.find_by_login(login); (!user.nil? ? : nil) }
['AudioRecording', 'Document', 'StillImage', 'Topic', 'Video', 'WebLink'].each { |type| Module.class_eval(type).find_all_by_license_id(nil).each { |t| t.license_id = new_license_id if logins.include?(; t.save_without_revision } }

Alternatively, you can do all existing records with a you database client program directly (in this case mysql) which is better suited for large amounts of records.  Like so:

$ mysql -u your_user -pyour_password your_database
> update audio_recordings set license_id = 1; # use the correct id of the license you want
> update documents set license_id = 1;
> update still_images set license_id = 1;
> update topics set license_id = 1;
> update videos set license_id = 1;
> update web_links set license_id = 1;
> exit

In the direct database case, you will also want to "rake tmp:cache:clear" and rebuild your search records, too.

And that's it. All content created by people in the logins array will now be set to the license id you specified.

Notifying contributors of licensing capability

As mentioned in the disclaimer, if you change licenses without permission, you will be violating copyright and may get into trouble. So rather than chaning them yourself, you can get permission from the content creators to bulk update it to their chosen license, or notify them that they can change the license themselves. To get a list of content creators, you can run the following in "script/console production" to get a list of emails you can paste into a CC or BCC field along with an email describing how to set licenses or to tell you what license they want. The content is up to you.

contribs_hash, contribs_list = {}, []
['AudioRecording', 'Document', 'StillImage', 'Topic', 'Video', 'WebLink'].each { |type| Module.class_eval(type).all.each { |t| contribs_hash[] = [(!t.creator.user_name.blank? ? t.creator.user_name : t.creator.login),] } }
contribs_hash.each { |c| contribs_list "#{c[1][0]} <#{c[1][1]}>" }
contribs_list.join(", ")

And that's it. Adding, setting default, updating content, and notifying contributors. If you have any questions please post them in the comment section below.

Discuss This Topic

There are 0 comments in this discussion.

join this discussion