How to add Users and Roles to a Project created using AEM 6.2 Project API?
I'm trying to create Projects in AEM 6.2 using the new Project API [ https://docs.adobe.com/docs/en/aem/6-2/develop/ref/javadoc/com/adobe/cq/projects/api/Project.html ]
I am able to create the Project and also use a Template that i developed for that Project.
When i am trying to add Users and Roles to the Project using the method
project = projectManager.createProject("/contents/projects", "Project1", "Project Name", "Creating a Test Project", "/apps/myproj/projects/templates/default"); ... List<String> usersIds = ... List<String> rolesIds = ... project.updateMembers(userIds, roleIds);
I tried to map the values in lists 'usersIds' to 'rolesIds', like..
(userId)ksurendra --> (roleId) role_editor
I'm seeing the exceptions like:
Caused by: com.adobe.cq.projects.impl.team.TeamException: The role role_editor is not available for admin.
Appreciate any thoughts on this.