[OPEN-ILS-DEV] (Patch) Make group permission setup a bit easier to decipher

Dan Scott dan at coffeecode.net
Thu Nov 12 12:24:56 EST 2009


On Thu, 2009-11-12 at 11:51 -0500, Warren Layton wrote:
> On Thu, Nov 12, 2009 at 11:17 AM, Joe Atzberger
> <jatzberger at esilibrary.com> wrote:
> > On Thu, Nov 12, 2009 at 12:21 AM, Jason Etheridge <jason at esilibrary.com>
> > wrote:
> >> Incidentally, the reason why we're so concerned about consistent key
> >> values is for oils_i18n_gettext, which needs pinned values to
> >> associate with translations.
> >
> > Ah, that would be a legitimate reason.
> 
> 
> How about something like the attached patch, then? It doesn't change
> any of the statements (so the ids are kept intact) but comments are
> added to indicate which permissions are being added to each group.

Nope, I think your first patch was the keeper. There's no i18n attached
to the grp_perm_map table, it's purely a mapping of groups to perms, so
the oils_i18n_gettext() issue that Jason mentioned is a non-issue in
this case.

It is a very real concern for the perm_list table, and to a lesser
extent the grp_tree table, but in those cases I think it would make more
sense to move to natural keys. With natural keys there's a danger that
if sites add their own local permissions they could clash with future
names that are added to core, but we could perhaps either reserve a
naming prefix for Evergreen core ("CORE_*"? but that would mean renaming
everything that's already there, which would be pretty extensive), or
adopt a convention that we will never add names to core with a certain
prefix (like "LCL_CUSTOM_" or something like that).



More information about the Open-ils-dev mailing list