|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjetbrains.buildServer.serverSide.auth.AuthUtil
public class AuthUtil
| Field Summary | |
|---|---|
static Permission[] |
ADMIN_ZONE_PERMISSIONS
|
| Method Summary | |
|---|---|
static boolean |
adminSpaceAvailable(AuthorityHolder authorityHolder)
Returns true if authority holder has at least one permission allowing him to access administration space |
static boolean |
canViewUserProfile(AuthorityHolder authorityHolder,
SUser user)
Checks whether authority holder can access user profile data (email and properties). |
static boolean |
groupManagementAvailable(AuthorityHolder authorityHolder)
Returns true if group management interface is available |
static boolean |
hasFileContentAccess(AuthorityHolder authorityHolder,
SVcsModification modification)
Returns true if authority holder has view file content access to any build configuration related to specified modification, or any build configuration related to any duplicate of specified modification |
static boolean |
hasGlobalPermission(AuthorityHolder authorityHolder,
Permission permission)
Returns true if specified authority holder has specified global permission |
static boolean |
hasPermissionToEditVcsRoot(AuthorityHolder authHolder,
SVcsRoot vcsRoot)
Checks whether specified authority holder can edit VCS root |
static boolean |
hasPermissionToManageAgentPoolsWithProject(AuthorityHolder authHolder,
java.lang.String projectId)
Checks whether specified authority holder can manage agent pool-project association for the specified project. |
static boolean |
hasPermissionToManageAgentPoolsWithProjects(AuthorityHolder authHolder,
java.util.Collection<java.lang.String> projects)
Checks whether specified authority holder can manage agent pools the given projects are associated with. |
static boolean |
hasPermissionToManageAllAgentPoolProjectAssociations(AuthorityHolder authHolder)
Checks whether specified authority holder can manage agent pool-project associations for all pools. |
static boolean |
hasPermissionToManageAllProjects(AuthorityHolder authHolder)
Checks whether specified authority holder can manage all projects. |
static boolean |
hasPermissionToManageProject(AuthorityHolder authHolder,
java.lang.String projectId)
Checks whether specified authority holder can manage the given project. |
static boolean |
hasPermissionToManageProjects(AuthorityHolder authHolder,
java.util.Collection<java.lang.String> projects)
Checks whether specified authority holder can manage all the given projects. |
static boolean |
hasPermissionToStartBuild(AuthorityHolder authorityHolder,
BuildType buildType,
BuildAgent agent)
Returns true if authority holder has permissions to start build in specified configuration |
static boolean |
hasReadAccessTo(AuthorityHolder authorityHolder,
Build build)
Returns true if authority holder has read access to build project |
static boolean |
hasReadAccessTo(AuthorityHolder authorityHolder,
BuildTypeDescriptor buildType)
Returns true if authority holder has read access to build configuration project |
static boolean |
hasReadAccessTo(AuthorityHolder authorityHolder,
java.lang.String projectId)
Returns true if authority holder has read access to a project with specified id |
static boolean |
hasReadAccessTo(AuthorityHolder authorityHolder,
SVcsModification modification)
Returns true if authority holder has read access to the specified VCS modification (has read access to at least one build configuration where this modification appeared) |
static boolean |
hasReadAccessTo(AuthorityHolder authorityHolder,
SVcsRoot vcsRoot)
Returns true if authority holder has read access to the specified VCS root |
static boolean |
isSystemAdmin(AuthorityHolder authHolder)
Returns whether a specified authHolder is a system admin (has system admin role). |
static boolean |
userManagementAvailable(AuthorityHolder authorityHolder)
Returns true if user & group management interfaces are available |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Permission[] ADMIN_ZONE_PERMISSIONS
| Method Detail |
|---|
public static boolean hasReadAccessTo(@NotNull
AuthorityHolder authorityHolder,
@NotNull
java.lang.String projectId)
authorityHolder - authority holderprojectId - project id
public static boolean hasReadAccessTo(@NotNull
AuthorityHolder authorityHolder,
@NotNull
BuildTypeDescriptor buildType)
authorityHolder - authority holderbuildType - build configuration
public static boolean hasReadAccessTo(@NotNull
AuthorityHolder authorityHolder,
@NotNull
Build build)
authorityHolder - authority holderbuild - build
public static boolean hasReadAccessTo(@NotNull
AuthorityHolder authorityHolder,
@NotNull
SVcsRoot vcsRoot)
authorityHolder - authority holdervcsRoot - vcs root
public static boolean hasReadAccessTo(@NotNull
AuthorityHolder authorityHolder,
@NotNull
SVcsModification modification)
authorityHolder - authority holdermodification - VCS modification
public static boolean hasFileContentAccess(@NotNull
AuthorityHolder authorityHolder,
@NotNull
SVcsModification modification)
authorityHolder - authority holdermodification - VCS modification
public static boolean adminSpaceAvailable(@NotNull
AuthorityHolder authorityHolder)
authorityHolder - authority holder
public static boolean hasGlobalPermission(@NotNull
AuthorityHolder authorityHolder,
@NotNull
Permission permission)
authorityHolder - authority holderpermission - permission
public static boolean hasPermissionToStartBuild(@NotNull
AuthorityHolder authorityHolder,
@NotNull
BuildType buildType,
@Nullable
BuildAgent agent)
authorityHolder - authority holderbuildType - build configurationagent - agent
public static boolean userManagementAvailable(@NotNull
AuthorityHolder authorityHolder)
authorityHolder - authority holder
public static boolean groupManagementAvailable(@NotNull
AuthorityHolder authorityHolder)
authorityHolder - authority holder
public static boolean hasPermissionToEditVcsRoot(@NotNull
AuthorityHolder authHolder,
@NotNull
SVcsRoot vcsRoot)
public static boolean hasPermissionToManageProject(@NotNull
AuthorityHolder authHolder,
@NotNull
java.lang.String projectId)
authHolder - authority holder.projectId - project identifier.
public static boolean hasPermissionToManageProjects(@NotNull
AuthorityHolder authHolder,
@NotNull
java.util.Collection<java.lang.String> projects)
authHolder - authority holder.projects - identifiers of projects to check.
public static boolean hasPermissionToManageAgentPoolsWithProject(@NotNull
AuthorityHolder authHolder,
@NotNull
java.lang.String projectId)
authHolder - authority holder.projects - identifiers of projects to check.
hasPermissionToManageAgentPoolsWithProjects(jetbrains.buildServer.serverSide.auth.AuthorityHolder, java.util.Collection) ,
hasPermissionToManageAllAgentPoolProjectAssociations(jetbrains.buildServer.serverSide.auth.AuthorityHolder)
public static boolean hasPermissionToManageAgentPoolsWithProjects(@NotNull
AuthorityHolder authHolder,
@NotNull
java.util.Collection<java.lang.String> projects)
authHolder - authority holder.projects - identifiers of projects to check.
hasPermissionToManageAgentPoolsWithProject(jetbrains.buildServer.serverSide.auth.AuthorityHolder, java.lang.String),
hasPermissionToManageAllAgentPoolProjectAssociations(jetbrains.buildServer.serverSide.auth.AuthorityHolder)
public static boolean hasPermissionToManageAllAgentPoolProjectAssociations(@NotNull
AuthorityHolder authHolder)
authHolder - authority holder.projects - identifiers of projects to check.
hasPermissionToManageAgentPoolsWithProject(jetbrains.buildServer.serverSide.auth.AuthorityHolder, java.lang.String),
hasPermissionToManageAgentPoolsWithProjects(jetbrains.buildServer.serverSide.auth.AuthorityHolder, java.util.Collection)
public static boolean hasPermissionToManageAllProjects(@NotNull
AuthorityHolder authHolder)
authHolder - authority holder.
public static boolean canViewUserProfile(@NotNull
AuthorityHolder authorityHolder,
@NotNull
SUser user)
authorityHolder - authority holderuser - user
public static boolean isSystemAdmin(@NotNull
AuthorityHolder authHolder)
authHolder is a system admin (has system admin role).
authHolder - authority holder
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||