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)