Package com.microsoft.jenkins.azuread
Class AzureAdMatrixAuthorizationStrategy
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<AuthorizationStrategy>
-
- hudson.security.AuthorizationStrategy
-
- com.microsoft.jenkins.azuread.GlobalMatrixAuthorizationStrategy
-
- com.microsoft.jenkins.azuread.AzureAdMatrixAuthorizationStrategy
-
- All Implemented Interfaces:
AuthorizationContainer
,ExtensionPoint
,Describable<AuthorizationStrategy>
public class AzureAdMatrixAuthorizationStrategy extends GlobalMatrixAuthorizationStrategy
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AzureAdMatrixAuthorizationStrategy.ConverterImpl
static class
AzureAdMatrixAuthorizationStrategy.DescriptorImpl
-
Nested classes/interfaces inherited from class com.microsoft.jenkins.azuread.GlobalMatrixAuthorizationStrategy
GlobalMatrixAuthorizationStrategy.PermissionAdderImpl
-
Nested classes/interfaces inherited from class hudson.security.AuthorizationStrategy
AuthorizationStrategy.Unsecured
-
Nested classes/interfaces inherited from interface com.microsoft.jenkins.azuread.AuthorizationContainer
AuthorizationContainer.IdStrategyComparator, AuthorizationContainer.PermissionEntryComparator
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class com.microsoft.jenkins.azuread.GlobalMatrixAuthorizationStrategy
DANGEROUS_PERMISSIONS, DESCRIPTOR
-
Fields inherited from class hudson.security.AuthorizationStrategy
LIST, UNSECURED
-
-
Constructor Summary
Constructors Constructor Description AzureAdMatrixAuthorizationStrategy()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Permission p, PermissionEntry entry)
static void
fixClassNameTypo()
ACL
getACL(AbstractItem item)
ACL
getACL(ItemGroup<?> g)
ACL
getACL(Job<?,?> project)
ACL
getACL(Node node)
Set<String>
getGroups()
Internal only: Returns all recorded (possible) group sids to allow populatingAuthorizationStrategy.getGroups()
.boolean
hasExplicitPermission(PermissionEntry entry, Permission p)
Return true if and only if the exact permission entry is explicitly granted the specified permission, ignoring compatible types (e.g.boolean
hasPermission(String sid, Permission p, boolean principal)
Checks if the given SID has the given permission.static ACL
inheritingACL(ACL parent, ACL child)
-
Methods inherited from class com.microsoft.jenkins.azuread.GlobalMatrixAuthorizationStrategy
getEditingPermission, getGrantedPermissionEntries, getRootACL, recordGroup
-
Methods inherited from class hudson.security.AuthorizationStrategy
all, 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
-
Methods inherited from interface com.microsoft.jenkins.azuread.AuthorizationContainer
add, add, getAllPermissionEntries, getAllSIDs, getDescriptor, getGrantedPermissions, hasExplicitPermission, hasPermission
-
-
-
-
Method Detail
-
getACL
@NonNull public ACL getACL(@NonNull Job<?,?> project)
- Overrides:
getACL
in classAuthorizationStrategy
-
getACL
@NonNull public ACL getACL(@NonNull Node node)
- Overrides:
getACL
in classAuthorizationStrategy
-
inheritingACL
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static ACL inheritingACL(ACL parent, ACL child)
-
getACL
@NonNull public ACL getACL(@NonNull AbstractItem item)
- Overrides:
getACL
in classAuthorizationStrategy
-
getGroups
@NonNull public Set<String> getGroups()
Description copied from interface:AuthorizationContainer
Internal only: Returns all recorded (possible) group sids to allow populatingAuthorizationStrategy.getGroups()
.- Specified by:
getGroups
in interfaceAuthorizationContainer
- Overrides:
getGroups
in classGlobalMatrixAuthorizationStrategy
-
add
public void add(Permission p, PermissionEntry entry)
Description copied from interface:AuthorizationContainer
Adds toAuthorizationContainer.getGrantedPermissionEntries()
. Use of this method should be limited during construction, as this object itself is considered immutable once populated.
-
hasExplicitPermission
public boolean hasExplicitPermission(PermissionEntry entry, Permission p)
Description copied from interface:AuthorizationContainer
Return true if and only if the exact permission entry is explicitly granted the specified permission, ignoring compatible types (e.g. passing USER will not match an EITHER entry) and implications.- Parameters:
entry
- the entry to check forp
- the permission to check for- Returns:
- true if and only if the exact entry matches
-
hasPermission
public boolean hasPermission(String sid, Permission p, boolean principal)
Description copied from interface:AuthorizationContainer
Checks if the given SID has the given permission.
-
fixClassNameTypo
@Initializer(before=PLUGINS_STARTED) public static void fixClassNameTypo()
-
-