cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict a custom document Library action from a non admin

saina
Champ in-the-making
Champ in-the-making
Hi,
Am working with Alfresco4.0.2.9 enterprise version. I created some custom document actions, which I mentioned them in my share-config-custom.xml as,
<action id="get-details" type="javascript" label="actions.page.modifydetails" icon="details">
                <param name="function">onDocModifyDetails</param>
                <permissions>
                    <permission allow="true">Write</permission>
                </permissions>
            <evaluator>evaluator.doclib.action.isContainerType</evaluator>
         </action>

I can see this action in UI. I want to restrict this action only for admin group where as other users shouldnt be able to perform this action. I tried it as,

<action id="get-details" type="javascript" label="actions.page.modifydetails" icon="details">
                <param name="function">onDocModifyDetails</param>
                <permissions>
                    <permission allow="true">Administrator</permission>
                </permissions>
            <evaluator>evaluator.doclib.action.isContainerType</evaluator>
         </action>
With this modification, even admin is unable to see that action.
Can anybody help me to achieve it avail only for admins….???

Thanks,
Saina
1 REPLY 1

anshu_kumar
Star Contributor
Star Contributor
Hi Saina,

I suggest you to create and use your custom Evaluator.