grantAll timing behaviour inconsistent with grant

Bug #343610 reported by Wolfgang Schnerring
2
Affects Status Importance Assigned to Milestone
Zope 3
Won't Fix
Undecided
Unassigned
zope.securitypolicy
New
Undecided
Unassigned

Bug Description

You can <grant> a permission that is defined by ZCML executed *after* the <grant>, like so:
  <grant role="some.Role" permission="MyPermission"/>
  <permission id="MyPermission" title="foo"/>
But a <grantAll> will *not* pick up any permissions that are defined *after* the <grantAll>, like so:
  <grantAll role="some.Role"/>
  <permission id="MyPermission" title="foo"/>

In the first example, someRole will have MyPermission, in the second it will not.

The reason is that the grant-Directive just passes on the permission's ID (a string), while the grantAll-directive relies on enumerating all existing permissions (using getUtility()).

How could grantAll be made consistent with grant?

Tres Seaver (tseaver)
Changed in zope3:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.