[Zope] Re: [Zope-CMF] Permissions
Gitte Wange
gitte@mmmanager.org
Thu, 7 Jun 2001 12:46:02 +0200
On Thursday 07 June 2001 12:55, you wrote:
> >Well in the action_box method in the skinsfolder you could add a check
>
> before
>
> >the links are written.
> >Something like:
> ><dtml-if
> >expr=3D"portal_membership.getAuthenticatedMember().has_role('Manager')=
">
> > Here comes the code for adding folders, content etc.
> ></dtml-if>
>
> Hi Gite thanks that works but now another question.
>
> I don=B4t want all the actions filtered out just a few.
> For instance the Preferences I would like to keep.
>
> I think that has something to do with the user_actions (not sure)
>
> Can you tell me where I should look what actions are defined as
> user_actions
>
> or else how to filter some actions out and some not?
>
> Thanx James
Well it's the folder mangement you want filtered out and you want to keep=
the=20
user mangement ... right?
Here's an example:
<BR>
--THIS CODE WILL STAY -- =09
<U>User Management</U><BR>
<img src=3D"&dtml-portal_url;/p_/User_icon" align=3D"left" alt=3D"User=
">
<dtml-var uname><BR><BR>
<dtml-in user_actions mapping>
<a href=3D"&dtml-url;"><dtml-var name></a><br>
</dtml-in>
<BR><BR>
<dtml-if expr=3D"portal_membership.isAnonymousUser()">
--NEW CODE --
<dtml-elif=20
expr=3D"portal_membership.getAuthenticatedMember().has_role('Manager')">
<dtml-if folder_actions>
<U>Folder Management</U><BR>
<dtml-in folder_actions mapping>
<a href=3D"&dtml-url;"><dtml-var name></a><br>
</dtml-in>
</dtml-if>
Hope this helps ...
Gitte