Class RolesActionHelper
- java.lang.Object
-
- jetbrains.buildServer.controllers.admin.RolesActionHelper
-
public class RolesActionHelper extends Object
Helper class simplifying user roles management.
-
-
Constructor Summary
Constructors Constructor Description RolesActionHelper(RolesManager rolesManager, ServerSettings serverSettings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassignRole(Collection<RolesHolder> rolesHolders, Collection<RoleScope> scopes, String roleId, boolean replaceRoles)Assigns role with specified id in specified projects to specified roles holders.voidsetAdministratorStatus(RolesHolder editee, boolean adminStatus)Changes administrator status of the specified user.voidunassignRole(Collection<RolesHolder> rolesHolders, Collection<RoleScope> scopes, String roleId)Unassigns role with specified id for specified projects from the specified roles holders.
-
-
-
Constructor Detail
-
RolesActionHelper
public RolesActionHelper(@NotNull RolesManager rolesManager, @NotNull ServerSettings serverSettings)
-
-
Method Detail
-
assignRole
public void assignRole(@NotNull Collection<RolesHolder> rolesHolders, @NotNull Collection<RoleScope> scopes, @NotNull String roleId, boolean replaceRoles)Assigns role with specified id in specified projects to specified roles holders.- Parameters:
rolesHolders- roles holdersscopes- colelction of role scopesroleId- role idreplaceRoles- whether old roles should be removed or not
-
unassignRole
public void unassignRole(@NotNull Collection<RolesHolder> rolesHolders, @NotNull Collection<RoleScope> scopes, @NotNull String roleId)Unassigns role with specified id for specified projects from the specified roles holders.- Parameters:
rolesHolders- roles holdersscopes- colelction of role scopesroleId- role id
-
setAdministratorStatus
public void setAdministratorStatus(@NotNull RolesHolder editee, boolean adminStatus)Changes administrator status of the specified user.- Parameters:
editee- useradminStatus- true to make user an administrator and false otherwise
-
-