Opened 13 years ago

Last modified 13 years ago

#233 closed defect (FIXED)

Basic content license support

Reported by: nyergler Owned by: Aaron Williamson
Priority: minor Milestone: 0.2.1
Component: programming Keywords:
Cc: Parent Tickets:

Description

We need to add support for licensing content uploaded to GMG
instances. For basic support we need to implement the following:


-  attach the license (identified by a URI) to Media
-  allow users to select a license for media (probably start with
   fixed set)
-  display license when users view the media page



Change History (15)

comment:1 by nyergler, 13 years ago

Owner: set to Nathan Yergler

comment:1 by nyergler, 13 years ago

I've been thinking about this a bit, and I think there are a couple
things we'll want to add for basic support:


-  License as a URI field on Media
-  License information in the database (probably really basic --
   URL, name, image URL)

For the latter, do we have "fixture" support at the moment? If it's
just a first cut, maybe we write it as a migration that loads the
values into Mongo?



comment:2 by Christopher Allan Webber, 13 years ago

Agreed re: having a license uri on media, and license information
in the database. I actually think licenses deserve their own
collection where the license URI is the \_id.

Regarding fixtures, we have a bug; I was specifically talking about
test fixtures while speaking to Caleb about this.
`http://bugs.foocorp.net/issues/570 <http://bugs.foocorp.net/issues/570>`_

Perhaps we should start thinking about whether there should be a
"first time" procedure that's run... either with the app's init
(what I'd prefer) or a command you run like ./bin/gmg firstrun (I'd
much prefer the app init first-time-run if it doesn't take too much
time, and as long as it's simple stuff like setting up some
fixtures, I think it should be simple.)



comment:3 by nyergler, 13 years ago

Status: NewIn Progress

comment:4 by Christopher Allan Webber, 13 years ago

Milestone: 0.1.00.2.0

comment:3 by Christopher Allan Webber, 13 years ago

Added Corey Farwell to this ticket.

Nathan, are you still interested in working on this? In our last
meeting you said that you were interested in "at least providing a
writeup on how it should work" or something of the sort.

I'd be interested in this hitting 0.1.1/0.2.0 at the end of this
month if it's possible! If not, oh well. But i don't like taking
things off of peoples' plates without talking about it.

Anyway, I'd like to see a nicer version of licensing, but people
are complaining about the lack of CC licensing whatsoever. I think
what you've said about a separate table for licensing is right, but
probably in the interim, we could get around #2: "License
information in the database (probably really basic -- URL, name,
image URL)" by doing something super dumb: just include a
dictionary in a module like:

::

    SUPPORTED_LICENSES = {
      "http://creativecommons.org/licenses/by/3.0/": {
        "name": "CC BY 3.0,
        ...}}

That would allow us to get basic support in that we could migrate
"up" from without the need for fixtures. Then we could do
MediaEntry['license'] as discussed earlier.

I'd be interested in knowing what you think and how soon you could
get to things! (I know you're also working on spec'ing out the
API.) It's possible we could do this dumb version first and then
iterate/migrate towards the right way.



comment:4 by nyergler, 13 years ago

If someone else is interested in working on this they should. I
will have some time over the Thanksgiving holiday, but not really
until then. I think the naive approach could be a fine start,
especially if you avoid accessing that dict directly and write a
thin wrapper (ie, "def get\_licenses()" to return a list of license
URIs, etc). That would make iteration towards the "right" way
easier.

I'm happy to provide review or feedback about this; if someone else
starts working on it, it'd be great to have the work on an
accessible branch so I can help out :).



comment:5 by Christopher Allan Webber, 13 years ago

Great to hear you'll have time over thanksgiving-ish :)

Corey, if you want to do some of the work on what's discussed here
before then, feel free. Otherwise, look forward to this holiday
feature ;)



comment:6 by Elrond, 13 years ago

Milestone: 0.2.00.2.1
roll over



comment:7 by Elrond, 13 years ago

Component: InfrastructureProgramming

comment:7 by Aaron Williamson, 13 years ago

Owner: changed from Nathan Yergler to Aaron Williamson
As Chris and I discussed in channel, I'm taking a stab at this, so
I've assigned it to myself. Elrond is currently reviewing my
working branch here:
[https://gitorious.org/\ :sub:`copiesofcopies/mediagoblin/copiesofcopies-mediagoblin/commits/feature544\_basic\_license\_data](https://gitorious.org/`\ copiesofcopies/mediagoblin/copiesofcopies-mediagoblin/commits/feature544\_basic\_license\_data)



comment:8 by Aaron Williamson, 13 years ago

Owner: changed from Aaron Williamson to Elvenlord Elrond
Status: In ProgressFeedback
Addressed issues raised by Elrond, submitted merge request here:
`https://gitorious.org/mediagoblin/mediagoblin/merge\_requests/33 <https://gitorious.org/mediagoblin/mediagoblin/merge_requests/33>`_



comment:9 by Aaron Williamson, 13 years ago

Added migration for license field, updated merge request.



comment:10 by Elrond, 13 years ago

Owner: changed from Elvenlord Elrond to Aaron Williamson
Status: FeedbackClosed
Merged!
Yeah! Great work!

Note 1: We don't use the merge requests on gitorious at all (if you
meant those in the last message on here?).

Note 2: I fixed unit tests which failed in a non obvious way (at
least to me). I made the license field in the forms option and
improved the defaulting in the views.



comment:11 by Will Kahn-Greene, 13 years ago

The original url for this bug was http://bugs.foocorp.net/issues/544 .

Note: See TracTickets for help on using tickets.