Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

AEM Assets select action

Avatar

Level 2

Hi All,

Need help with a requirement. I have to hide certain select actions in assets.html for some particular user group (hide Manage tags, To Collection, Copy etc). Currently we get all the below options on selection.

Screen Shot 2018-05-21 at 10.13.27 AM.png

I overlayed the action selection node and tried hideChildren but it hides these options for all the users including admin (which is obvious so I can't use this way) and I also tried applying rep:policy but somehow these policies don't work and the options load from some render condition JSPs. I cannot modify these OOTB JSPs so please suggest me something which will work here. I am not sure how to do it via JS. Can anyone help me on this?

4 Replies

Avatar

Community Advisor

HI,

Can you try adding rendercondition for the actions(overlayed in apps) that you would like to show/hide for certain user groups.

OOB : PrivilegeRenderCondition - PrivilegeRenderCondition ("The Adobe AEM Quickstart and Web Application.")

Usage:

  • Create a node named "granite:rendercondition" under the action desired
    • Add properties named "sling:resourceType" -> granite/ui/components/coral/foundation/renderconditions/privilege
    • path and privileges - indicatiing path and privilege types to refrain user groups.

You can also try creating custom render conditions based on your need and add it to actions as mentioned in the usage where

  • sling:resourceType would point to the render condition JSP that you have written.
  • custom properties that you would like to fetch in your JSP can be added and same would be available in ComponentConfig     (cmp.getConfig() where cmp -> ComponentHelper object available from global.jsp)

Reference for writing custom Render condition : /libs/granite/ui/components/coral/foundation/renderconditions/privilege/privilege.jsp

Avatar

Level 1

I have similar requirement where we need to hide/show certain action buttons on selection of assets or folder depending on user groups. I have written render.jsp and applied logic in it for user groups but not able to fetch selected asset or folder in it. how to do that ?

 

 

Avatar

Level 3

Hello Community,

I have similar requirement. I need to provide the Delete button only if the asset is created by the editing user and should be hidden to rest of the users.

I am unable to achieve this through render condition actions as it's a generic to asset details html/page.

Please let me know if your suggestions.

Thanks,

Vinay

Avatar

Community Advisor

you need to overlay delete button and add one more renderrer with AND condition at /apps/dam/gui/content/assets/jcr:content/actions/selection/delete/granite:rendercondition like 

/libs/dam/gui/content/assets/jcr:content/actions/selection/create/granite:rendercondition



Arun Patidar