Package hudson.plugins.collabnet.auth
Class CNProjectACL.CollabNetRoles
- java.lang.Object
-
- hudson.plugins.collabnet.auth.CNProjectACL.CollabNetRoles
-
- Enclosing class:
- CNProjectACL
public static class CNProjectACL.CollabNetRoles extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static CollabNetRole
HUDSON_BUILD_ROLE
static CollabNetRole
HUDSON_CONFIGURE_ROLE
static CollabNetRole
HUDSON_DELETE_ROLE
static CollabNetRole
HUDSON_READ_ROLE
-
Constructor Summary
Constructors Constructor Description CollabNetRoles()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Collection<CollabNetRole>
getAllRoles()
static CollabNetRole
getGrantingRole(Permission permission)
Given a permission, return the CollabNet role which would grant that permission (if any).static Collection<CollabNetRole>
getMatchingRoles(CTFList<CTFRole> userRoleSet)
Get the applicable Jenkins roles matching a set of user role namesstatic List<String>
getNames()
-
-
-
Field Detail
-
HUDSON_READ_ROLE
public static final CollabNetRole HUDSON_READ_ROLE
-
HUDSON_BUILD_ROLE
public static final CollabNetRole HUDSON_BUILD_ROLE
-
HUDSON_CONFIGURE_ROLE
public static final CollabNetRole HUDSON_CONFIGURE_ROLE
-
HUDSON_DELETE_ROLE
public static final CollabNetRole HUDSON_DELETE_ROLE
-
-
Method Detail
-
getMatchingRoles
public static Collection<CollabNetRole> getMatchingRoles(CTFList<CTFRole> userRoleSet)
Get the applicable Jenkins roles matching a set of user role names- Parameters:
userRoleSet
- names of roles to match- Returns:
- a collection of Jenkins roles with names that exist in user role set
-
getAllRoles
public static Collection<CollabNetRole> getAllRoles()
- Returns:
- all roles. Lazily initialized.
-
getGrantingRole
public static CollabNetRole getGrantingRole(Permission permission)
Given a permission, return the CollabNet role which would grant that permission (if any). Returns the first permission granting role found (but we expect only one).- Parameters:
permission
- Permission object- Returns:
- the CollabNet role which would grant that permission, or null if none would.
-
-