[Building Sakai] Question about sakai functions (i.e. permissions)

Matthew Jones matthew at longsight.com
Thu Mar 15 10:40:42 PDT 2012


I'm not sure either. I wonder why it was 99. Maybe it was a long day and
Glenn was counting down bottles of beer on the wall? ;) I know for old
versions of mysql, varchar 255 made sense and some other values in the
realms like REALM_ID are 255. It doesn't even seem like it would make work
for utf8 any better. Perhaps slightly more efficient queries or slightly
less space in the cache, but that probably doesn't matter too much anymore.

I personally don't see any problem with you introducing a new delimiter
and/or even increasing the size of this column up to the old mysql varchar
length of 255. (If needed) I can't find anything in the code under quick
check that would limit this function name to [a-zA-Z.] and can't think of
anything if unless you chose a non ascii character as the delimiter?

On Thu, Mar 15, 2012 at 1:05 PM, Jim Eng <jimeng at umich.edu> wrote:

> The names (or identifiers?) for permissions in sakai seem to be strings
> made up of alphabetic characters (mostly lower-case?) and dots (like the
> one at the end of this sentence).  They also seem to be pretty short,
> usually no more than 20 or 30 characters.  For example, "content.read" or
> "annc.delete.own" are two permissions used in sakai core.
>
> The characteristics I mentioned seem to be conventions rather than
> requirements.  I don't see any documentation for any rules about what
> characters are valid/invalid or restrictions on length.    I am wondering
> whether there is anybody knows if there are any.
>
> I am asking because I need to store a short list of permissions in the
> database, and it would be easier to store them in a delimited string rather
> than storing them individually.  But I'd want to make sure the delimiter
> would never be used in a permission id and that the database column is big
> enough to store the entire string.
>
> It looks like function names are limited to 99 characters in the
> SAKAI_REALM_FUNCTION table, but I'm not sure that is guaranteed elsewhere.
>
> Suggestions appreciated.
>
> Thanks.
>
> Jim
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120315/fc5c1a01/attachment.html 


More information about the sakai-dev mailing list