활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
We have a requirement where we have to provide permissions to different groups by using workflows. I am not able to find the API which I can use to add the path to the respective groups.
@arunpatidar @Lokesh_Shivalingaiah
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
Hi Ashish,
You can use, AccessControlManager API - https://docs.adobe.com/docs/en/spec/jsr170/javadocs/jcr-2.0/javax/jcr/security/AccessControlManager....
Hi Ashish,
You can use, AccessControlManager API - https://docs.adobe.com/docs/en/spec/jsr170/javadocs/jcr-2.0/javax/jcr/security/AccessControlManager....
Thanks, for the help, i have implemented the same code from this. But when i am trying to add a group to another group as members, It is not getting added and no Error is also displaying.
Map<String, Object> subServiceParameters = new HashMap<>();
subServiceParameters.put(ResourceResolverFactory.SUBSERVICE, GlobalConstants.SERVICE_USER_MAPPER_NAME);
ResourceResolver resourceResolver = resourceResolverFactory.getServiceResourceResolver(subServiceParameters);
UserManager userManager = workflowSession.adaptTo(ResourceResolver.class).adaptTo(UserManager.class);
Group group = (Group) userManager.getAuthorizable("COMPANY_ADMINISTRATORS");
group.addMember(userManager.getAuthorizable("COMPANY_TAG_ADMINISTRATORS"));
Session session = resourceResolver.adaptTo(Session.class);
session.save();
조회 수
답글
좋아요 수
Hi Ashish,
The issue is because the operation is done on two different sessions. the user manager has been created from workflow session and the session that is saved is the administrative session created from service user. Please try saving the workflow session that should add the group.
Thanks,
Amuthesan.
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수