How Do I change/set permissions for different users to only access certain folders in the DAM?

Avatar

Avatar
Validate 1
Level 1
AnmolBhardwaj1808
Level 1

Likes

0 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Establish
View profile

Avatar
Validate 1
Level 1
AnmolBhardwaj1808
Level 1

Likes

0 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Establish
View profile
AnmolBhardwaj1808
Level 1

30-06-2021

I am using AEM 6.5 , and I need to set permissions for different user groups to only access certain folders in DAM depending upon some rules. I have been trying to find the right example where this has been implemented but was not able to find it. Can you please point me in the right direction.

 

I want to get user groups and and users in Java through JCR and their permissions and add/remove permissions through Java only.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
Level 4
kchaurasiya
Level 4

Likes

61 likes

Total Posts

57 posts

Correct reply

8 solutions
Top badges earned
Establish
View profile

Avatar
Establish
Level 4
kchaurasiya
Level 4

Likes

61 likes

Total Posts

57 posts

Correct reply

8 solutions
Top badges earned
Establish
View profile
kchaurasiya
Level 4

01-07-2021

@AnmolBhardwaj1808 As you want to achieve it through the java code then you can user the userManager API to get the user and the groups and later you can add the permissions.

UserManager userManager = resolver.adaptTo(UserManager.class);

From userManager get the groups.

Group Group1 = (Group) userManager.getAuthorizable(CONTENTAUTHOR);

 Thank You.

Keshav Chaurasiya

Answers (0)