If the methods return just a single permission instead of a collection of permissions, at least for GlobalPermissionActions, that means we can move to "Russian doll" type role levels, where each permission level includes all the permission levels below it (de facto the way Roller runs now). If we can officially be on that, that means we can toss out the userrole table and just place a single column "rolename" (indicating the highest role a person has) in the roller_user table, a very sleek change. (I'm not talking about Roller_Permission, i.e., permissions a user has on each blog -- that table is still needed, but the userrole table indicating whether one's a global admin or not.)

Glen

On 08/13/2014 07:54 AM, Dave wrote:
I don't have a strong opinion, but this seems like change just for the sake
of change. I doubt that impacts performance in any significant way,
especially when compared to all the database calls that are made during JSP
or page template processing.

- Dave


On Tue, Aug 12, 2014 at 9:15 PM, Glen Mazza <glen.ma...@gmail.com> wrote:

Hi team, one or both of these methods are heavily called within the
application, indeed for almost every action run:

     public List<String> requiredWeblogPermissionActions() {
         return Collections.singletonList(WeblogPermission.xxxxx);
     }

     public List<String> requiredGlobalPermissionActions() {
         return Collections.singletonList(GlobalPermission.xxxxxx);
     }

I've checked every implementation of both methods within the application
-- about 20-25 in all -- every one returns just a single permission
requirement, not a list of items.

I think it would be good to optimize these methods by having them return
just a string or a fast and lightweight enumeration constant.  The only
thing lost I can see would be the ability to require multiple permissions,
but again within the app today and through 12-14 years of Roller it just
hasn't been needed.  WDYT?

Regards,
Glen



Reply via email to