I solve it, but I think that there will be a easier way to do this. The
new component disables the user_manager action and then create a new
action (it's exactly the same than the former, but with different filters):
<extension target="org.nuxeo.ecm.platform.actions.ActionService"
point="actions">
<action id="user_manager" link="#{userManagerActions.viewUsers}"
enabled="false" label="command.manageMembers" order="20">
<category>USER_SERVICES</category>
<filter id="user_manager">
<rule grant="false">
<condition>
#{userServicesContext.userManagerEnabled}
</condition>
</rule>
</filter>
</action>
<action id="user_manager_for_administrators"
link="#{userManagerActions.viewUsers}"
enabled="true" label="command.manageMembers" order="20">
<category>USER_SERVICES</category>
<filter id="user_manager_for_administrators">
<rule grant="true">
<condition>#{userSession.administrator}</condition>
</rule>
</filter>
</action>
</extension>
It works fine, but, is there an easier way to do this? Maybe there is an
option for replacing actions.
Regards.
Enrique Perez escribió:
> Hi all,
>
> I want to enable the "Members management" link only for administrators
> users. So, I create a new component with the following content:
>
> <extension target="org.nuxeo.ecm.platform.actions.ActionService"
> point="actions">
>
> <action id="user_manager" link="#{userManagerActions.viewUsers}"
> enabled="true" label="command.manageMembers" order="20">
> <category>USER_SERVICES</category>
> <filter-id>only_for_manager</filter-id>
> </action>
>
> </extension>
>
> When I log in with a member user the link doesn't appear, but when I log
> in with an administrator user the link appear twice. Is there anything
> wrong in my XML file?
>
> Best regards.
>
>
--
Enrique PƩrez Olivares.
Dpto I+D.
Yerbabuena Software.
[EMAIL PROTECTED]
http://www.yerbabuena.es
Tlf/Fax: 902 995 246
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm