projectRoleService.addActorsToProjectRole() is a deprecated function. Is there another way to add a user into a specific group with a specific role?
I am currently only able to add users to groups but am unable to dictate their roles.
GroupManager groupManager = ComponentAccessor.getGroupManager()
Group group = groupManager.getGroup("your-group-name")
ApplicationUser userToAdd = ComponentAccessor.getUserManager().getUserByName("your-username")
groupManager.addUserToGroup(userToAdd, group)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.