On Aug 4, 7:18 am, Olemis Lang <ole...@gmail.com> wrote: > On Mon, Aug 3, 2009 at 6:21 PM, Ryan Ollos<ry...@physiosonics.com> wrote: > > > Hello, > > > I would like to implement a new permission called TRAC_VIEW that will > > be assigned to every authenticated user in my system. > > All users (except `anonymous`) belong to `authenticated` group. > > > I did some > > reading about the Tracpermissionsscheme [1], but I don't see how > > this can be done without writing a plug-in. > > Perhaps it is something related to definitions ( jargon ?) : > > Trac permission : Represents an action (abstract, may be a group of ) > that may be performed by users (e.g. TICKET_VIEW - view tickets and > comments, WIKI_VIEW - view wiki pages, ...) > > User Group : A group of users having that may perform the same group > of actions . > > > Is there a location I can > > simply define a new permission? > > > The problem I have is that I want all users to see the tab, but I have > > multiple groups with non-overlappingpermissions, and currently no > > single permission that I can assign to all users without granting some > > of those users access to resources I'd prefer them to not see, > > AFAICS what you need is to define groups of users having similarpermissions. > That could be done using LDAP (for example, AFAICR there > are other group providers) > > -- > Regards, > > Olemis. > > Blog ES:http://simelo-es.blogspot.com/ > Blog EN:http://simelo-en.blogspot.com/ > > Featured article:
you need to implement a custom permission handler: I know the archive seems lost, but I found this on the gmane copy. I can't find the original poster though, credit is not mine, I just hit CTRL-C CTRL-V: <pre> from trac.core import Component, implements from trac.perm import IPermissionRequestor class MyPermissions(Component): implements(IPermissionRequestor) def get_permission_actions(self): return ('MY_FIRST_PERM', 'MY_SECOND_PERM') </pre> with MY_FIRST_PERM, MY_SECOND_PERM as some new permissions added in this case you then added the MyPermissions handler to your permission handler list in config. So, you put this file in plugins directory, then add (in this case) MyPermissions to your permission handler configuration list. Now, this assumes all you want is a new permission name. If you want to do something special, you have to actually code it. Although, just having the permissions is sufficient. Such as IS_QA_PERSON then requiring IS_QA_PERSON with the worflow to move a ticket from inQA->Verfied or some other special states. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users@googlegroups.com To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---