|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.AbstractDescribableImpl<AuthorizationStrategy>
hudson.security.AuthorizationStrategy
hudson.security.GlobalMatrixAuthorizationStrategy
public class GlobalMatrixAuthorizationStrategy
Role-based authorization via a matrix.
Nested Class Summary | |
---|---|
static class |
GlobalMatrixAuthorizationStrategy.ConverterImpl
Persist GlobalMatrixAuthorizationStrategy as a list of IDs that
represent grantedPermissions . |
static class |
GlobalMatrixAuthorizationStrategy.DescriptorImpl
|
Nested classes/interfaces inherited from class hudson.security.AuthorizationStrategy |
---|
AuthorizationStrategy.Unsecured |
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
Field Summary | |
---|---|
static GlobalMatrixAuthorizationStrategy.DescriptorImpl |
DESCRIPTOR
|
Fields inherited from class hudson.security.AuthorizationStrategy |
---|
LIST, UNSECURED |
Constructor Summary | |
---|---|
GlobalMatrixAuthorizationStrategy()
|
Method Summary | |
---|---|
void |
add(Permission p,
String sid)
Adds to grantedPermissions . |
List<String> |
getAllSIDs()
Returns all SIDs configured in this matrix, minus "anonymous" |
Set<String> |
getGroups()
Returns the list of all group/role names used in this authorization strategy, and the ACL returned from the AuthorizationStrategy.getRootACL() method. |
SidACL |
getRootACL()
Returns the instance of ACL where all the other ACL instances
for all the other model objects eventually delegate. |
boolean |
hasExplicitPermission(String sid,
Permission p)
Checks if the permission is explicitly given, instead of implied through Permission.impliedBy . |
boolean |
hasPermission(String sid,
Permission p)
Checks if the given SID has the given permission. |
Methods inherited from class hudson.security.AuthorizationStrategy |
---|
all, getACL, getACL, getACL, getACL, getACL, getACL, getACL, getACL |
Methods inherited from class hudson.model.AbstractDescribableImpl |
---|
getDescriptor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Extension public static final GlobalMatrixAuthorizationStrategy.DescriptorImpl DESCRIPTOR
Constructor Detail |
---|
public GlobalMatrixAuthorizationStrategy()
Method Detail |
---|
public void add(Permission p, String sid)
grantedPermissions
.
Use of this method should be limited during construction,
as this object itself is considered immutable once populated.
public SidACL getRootACL()
AuthorizationStrategy
ACL
where all the other ACL
instances
for all the other model objects eventually delegate.
IOW, this ACL will have the ultimate say on the access control.
getRootACL
in class AuthorizationStrategy
public Set<String> getGroups()
AuthorizationStrategy
AuthorizationStrategy.getRootACL()
method.
This method is used by ContainerAuthentication
to work around the servlet API issue
that prevents us from enumerating roles that the user has.
If such enumeration is impossible, do the best to list as many as possible, then return it. In the worst case, just return an empty list. Doing so would prevent users from using role names as group names (see HUDSON-2716 for such one such report.)
getGroups
in class AuthorizationStrategy
public boolean hasPermission(String sid, Permission p)
public boolean hasExplicitPermission(String sid, Permission p)
Permission.impliedBy
.
public List<String> getAllSIDs()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |