Hello everyone,
Working on AEM 6.1, one of my customer is asking for a delete button on the asset page.
In order to do it, I've just overlay the asset page by creating /apps/dam/gui/content/assets/assetpage... until overlay actions buttons.
The button is here and I'm able to make it work in order to delete the current asset.
My issue is about the button visibility. I want him to be visible only by users that can delete the asset (policies).
I look at the edit button related nodes in /libs (which is not visible when the user didn't have modification rights) but i still don't get how this button disapear regarding users rights...
If anyone can help...
Thanks in advance and forgive my english :)
Grégory
Solved! Go to Solution.
Views
Replies
Total Likes
I wouldn't add the ACL on that button itself, but use a render condition like the one in the code sample:
Put such a config as a "rendercondition" child node of your button.
Views
Replies
Total Likes
This could be handled by giving the right ACLs accordingly to the group permission for which the users doesnt need that option.
To achieve the same
go to http://<host>:<port>/useradmin
click on the group you would like to not show the delete button and go to 'permissions tab
navigate to libs/dam/gui/content/assets and uncheck 'read' so that it will not be visible for the user who belongs to that group
ex: if you uncheck read for 'assetedit' edit button will not be visible
Views
Replies
Total Likes
Hi Gregory,
As Lokesh pointed out rightly, Using ACL's mechanism in AEM, you could hide delete button. Having said that I would like to point out alternative of this.
Rather than hiding a particular button, deny delete permission to the user/group, for whom you are hiding this delete button. This way, there will be less overhead maintaining permission at the component button level. And, maintaining ACL's for assets/folder is much easier.
Just a thought.
Jitendra
Views
Replies
Total Likes
I wouldn't add the ACL on that button itself, but use a render condition like the one in the code sample:
Put such a config as a "rendercondition" child node of your button.
Views
Replies
Total Likes
Gilles Knobloch wrote...
I wouldn't add the ACL on that button itself, but use a render condition like the one in the code sample:
https://github.com/Adobe-Marketing-Cloud/aem-admin-extension-customize-sites/tree/master/src/main/co...
https://github.com/Adobe-Marketing-Cloud/aem-admin-extension-customize-sites/blob/master/src/main/co...
Put such a config as a "rendercondition" child node of your button.
Hi Gilles,
Just wondering if you can explain why this approach is preferred over using ACLs?
We have been using ACLs to hide buttons in the classice UI (currently on AEM 6.1 SP1). But, from what I can tell there is no way to do the same in the touch UI.
Any insight would be appreciated.
Thanks,
--Kate
Views
Replies
Total Likes
Views
Likes
Replies