05-12-2020 03:38 AM
i have multiple Scenario's with me and want to disable multiple button's for different different roles. For example i want to disable view in browser button for my custom Role say role.unableview.
so i have written following code in share-config but it disable for all the users and not for my particular role only.
Please provide me solution that who can i disable that button for my particular role only.
Thanks,
Piyush
<config evaluator="string-compare" condition="DocLibActions"> <actions> <action id="document-view-content" type="link" label="actions.document.view"> <permissions> <permission allow="true">Read</permission> <permission allow="true">Write</permission> <permission allow="true">CheckOut</permission> <permission allow="true">CheckIn</permission> <permission allow="true">CancelCheckOut</permission> <permission allow="true">ReadPermissions</permission> </permissions> <param name="href">{viewUrl}</param> <evaluator>evaluator.doclib.action.isRoles.UnableView</evaluator> </action> </actions> </config>
05-25-2020 06:36 AM
Hi @abhinavmishra14 ,
I am not getting how to get all roles from the site. so that it can be used in custom evaluator.
I think code provided by you above is only to get role for the user that has logged into the server right now that is current user but how to get all the roles present in the site.
Thanks,
Piyush
05-25-2020 02:27 PM
Evalutors works on each node (evaluate nodes at run time and based on true/false value from evaluation, it hides/shows the actions/indicators). When a user is assigned a role in site or a folder, all nodes within site/folder inherits that role by default, unless you break inheritance manually via manage permissions. In case of role evaluation via evaluator, every node will be evaluated for the curretly logged in user.
Explore our Alfresco products with the links below. Use labels to filter content by product module.