hi,
just noticed that:

sharing.xml -> role id with space " "
<role id="New Role" />

rolemap.xml -> role name without space
<role name="NewRole" />

allthough the permission is not shown on front-page it actualy is granted.

all the best
peter



Jens W. Klein schrieb:

Hi,

Monday we hit a problem while trying to add new role and permission to
Plone.

The idea was to add a new role which has a new permission by default and
give a user the role. Goal was to show a user with the new permission
some different view on the content.

Now in Plone 4.1
- adding a permission is easy in zcml,
- adding a role is easy using rolemap.xml and
- assigning the permission to the role happens in rolemap.xml too.
- Adding the whole to the sharing tab is easy using sharing.xml.
Fine so far?

Now I started Plone,
- activated the addon and on Plone site root.
Theres the role, theres the permission assigned to the role (see
manage_access on the Plone Site in ZMI).
- I created a user,
- went to front-page sharing tab, assigned the new role to the new user
on front-page.
- logged in as new user
New user does not have the permission.
- Logged out, and in as manager user
- go to http://localhost:8080/Plone/front-page/manage_access
The new permission is not listed there? Why?
- go to
http://localhost:8080/Plone/front-page/front-page/manage_reportUserPermissions?user=newuser

You'll see the user has the role but does not have the permission.

To isolate the problem I made a tiny egg with self-contained buildout to
demonstrate the effect at https://github.com/jensens/newpermission

I'd be very happy for any hints whats missing or wrong or if theres a
bug around.

regards

Jens Klein


_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers

Reply via email to