Package hudson.plugins.collabnet.auth
Class CNAuthorizationStrategy
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<AuthorizationStrategy>
-
- hudson.security.AuthorizationStrategy
-
- hudson.plugins.collabnet.auth.CNAuthorizationStrategy
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<AuthorizationStrategy>
public class CNAuthorizationStrategy extends AuthorizationStrategy
Class for the CollabNet Authorization.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CNAuthorizationStrategy.DescriptorImpl
The CNAuthorizationStrategy Descriptor class.-
Nested classes/interfaces inherited from class hudson.security.AuthorizationStrategy
AuthorizationStrategy.Unsecured
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.security.AuthorizationStrategy
LIST, UNSECURED
-
-
Constructor Summary
Constructors Constructor Description CNAuthorizationStrategy(String readUsersStr, String readGroupsStr, String adminUsersStr, String adminGroupsStr, int authCacheTimeoutMin)
CNAuthorizationStrategy(List<String> readUsers, List<String> readGroups, List<String> adminUsers, List<String> adminGroups, int permCacheTimeoutMin)
Constructs a new CNAUthorizationStrategy object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ACL
getACL(AbstractItem item)
ACL
getACL(Computer computer)
ACL
getACL(Job<?,?> job)
ACL
getACL(User user)
ACL
getACL(View view)
String
getAdminGroupsStr()
String
getAdminUsersStr()
int
getAuthCacheTimeoutMin()
Get the number of min the cache is to be kept.long
getAuthCacheTimeoutMs()
Get the number of ms the cache is to be kept.Collection<String>
getGroups()
String
getReadGroupsStr()
String
getReadUsersStr()
ACL
getRootACL()
-
Methods inherited from class hudson.security.AuthorizationStrategy
all, getACL, getACL, getACL
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Constructor Detail
-
CNAuthorizationStrategy
public CNAuthorizationStrategy(List<String> readUsers, List<String> readGroups, List<String> adminUsers, List<String> adminGroups, int permCacheTimeoutMin)
Constructs a new CNAUthorizationStrategy object. This AuthorizationStrategy depends upon the CNAuthentication SecurityRealm.- Parameters:
readUsers
- a list of usernames (from CollabNet) that has system-wide read.readGroups
- a list of groupnames (from CollabNet) whose members have system-wide read.adminUsers
- a list of usernames (from CollabNet) that have all permissions in Jenkins.adminGroups
- a list of groupnames (from CollabNet) whose members have all permissions in Jenkins.permCacheTimeoutMin
- the cache timeout in min, after which the cache entries are cleared. -1 to disable.
-
-
Method Detail
-
getReadUsersStr
public String getReadUsersStr()
- Returns:
- a comma-delimited string of the read-only users.
-
getReadGroupsStr
public String getReadGroupsStr()
- Returns:
- a comma-delimited string of the read-only groups.
-
getAdminUsersStr
public String getAdminUsersStr()
- Returns:
- a comma-delimited string of the admin users.
-
getAdminGroupsStr
public String getAdminGroupsStr()
- Returns:
- a comma-delimited string of the admin groups.
-
getAuthCacheTimeoutMin
public int getAuthCacheTimeoutMin()
Get the number of min the cache is to be kept.- Returns:
- number of min
-
getAuthCacheTimeoutMs
public long getAuthCacheTimeoutMs()
Get the number of ms the cache is to be kept.- Returns:
- number of ms
-
getGroups
public Collection<String> getGroups()
- Specified by:
getGroups
in classAuthorizationStrategy
- Returns:
- the names of all groups/roles used in this authorization strategy.
-
getRootACL
public ACL getRootACL()
- Specified by:
getRootACL
in classAuthorizationStrategy
- Returns:
- the default ACL.
-
getACL
public ACL getACL(Job<?,?> job)
- Overrides:
getACL
in classAuthorizationStrategy
- Returns:
- the ACL specific to the CSFE project, if available. Otherwise, return the root ACL.
-
getACL
public ACL getACL(AbstractItem item)
- Overrides:
getACL
in classAuthorizationStrategy
-
getACL
public ACL getACL(View view)
- Overrides:
getACL
in classAuthorizationStrategy
-
getACL
public ACL getACL(Computer computer)
- Overrides:
getACL
in classAuthorizationStrategy
-
getACL
public ACL getACL(User user)
- Overrides:
getACL
in classAuthorizationStrategy
-
-