OOTB privilege render condition not working to show/hide custom selection action on folder(assets Touch UI) based on custom privilege

Avatar

Avatar
Validate 1
Level 1
kpsolanki_1204
Level 1

Like

1 like

Total Posts

8 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
kpsolanki_1204
Level 1

Like

1 like

Total Posts

8 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
kpsolanki_1204
Level 1

06-01-2021

Implemented a new jcr:namespace ("xyz") and based on that created a custom privilege ("xyz:superUser").

Now im assigning this privilege to a testUser on a given dam path (e.g. /content/dam/we-retail/activites/biking). User also has jcr:read permission on /content

My requirement is to hide/unhide a custom option(e.g. "Confirm Data") in top rail selection action bar  on the asset Touch UI based on the user having the custom privilege("xyz:superUser") or not on that path.

Overlayed the /libs/dam/gui/content/assets/jcr:content/actions/selection and created a custom action(e.g. "Confirm Data") .

Implemented the granite:rendercondition node under it and used the OOTB rendercondition(/libs/granite/ui/components/foundation/renderconditions/privilege).

Properties added to it

path String ${requestPathInfo.suffix}   --------> to get the path 

privileges String[]  xyz:superUser        ---------> to check the privilege required

 

Now when i log in as testUser, on selecting the biking folder, the top rail selection action bar should show the "Confirm Data" option based on the privilege given to the user.

But it is not working.

 

Can this be achieved by simply using the OOTB privilege render condition?

Can somebody guide me how it can be achieved.

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

07-01-2021

Try with granite/ui/components/coral/foundation/renderconditions/privilege

One more point , Rendererconditions only works on page load(backend rendering) not on selecting folder and navigating in dam folder structure, to achieve hide of custom button, you can simply deny access to /apps/dam/gui/content/assets/jcr:content/actions/selection/custom

Answers (0)