Hi,
I noticed the code snippet below does not work for the authzpolicy.conf
approach. The detected groups miss the ones I set in authzpolicy.conf in the
[groups] section. Any hint how I can cover that case?
F@lk wrote:
> This one helps.
>
> {{{
> group_providers = ExtensionPoint(IPermissionGroupProvider)
>...
>
> g = set([req.authname])
>
> for provider in self.group_providers:
> for group in provider.get_permission_groups(req.authname):
> g.add(group)
>
> perms = PermissionSystem(self.env).get_all_permissions()
> repeat = True
> while repeat:
> repeat = False
> for subject, action in perms:
> if subject in g and not action.isupper() and action not in g:
> g.add(action)
> repeat = True
>
> add_notice(req, g)
> }}}
> If ringo is logged in, that group g will contain "ringo", "beatles",
> "authenticated" and "anonymous".
CU, F@lk
----
R&D Software
Baumer Optronic GmbH
www.baumer.com
Gesch?ftsf?hrer: Dr. Albert Schmidt* Dr. Oliver Vietze
Sitz der Gesellschaft: Radeberg
Amtsgericht Dresden: HRB 15379
Ust. ID: DE 189714583
--
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-dev.
For more options, visit https://groups.google.com/groups/opt_out.