[annotator-dev] userAuthorize issue with custom permissions scheme

Jamie M Folsom jfolsom at MIT.EDU
Tue Nov 27 19:10:15 UTC 2012


I've made some progress implementing a custom permissions scheme, but I'm running up against a seeming quirk in how the annotator calls a custom userAuthorize function (as passed in the options object to the permissions plugin).

When checking for admin, update and delete permissions (on hover, to show the proper controls on the viewer), userAuthorize appears to be called with three arguments, which this function signature handles correctly:

	userAuthorize: function (action, annotation, user) {

But when calling the function to authorize read permissions (on edit button click, for example), it's called with just two arguments;

	userAuthorize: function (action, annotation) {

In no case does it appear to be called with the two arguments indicated in the wiki:

	userAuthorize: function (user, token) {

Is this a bug or am I missing something?

Thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1579 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20121127/44962fd6/attachment-0002.bin>


More information about the annotator-dev mailing list