Package io.inversion.action.security
Class AclRule
- java.lang.Object
-
- io.inversion.Rule<AclRule>
-
- io.inversion.action.security.AclRule
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.inversion.Rule
Rule.RuleMatcher
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanallowprotected booleanallPermissionsMustMatchprotected booleanallRolesMustMatchprotected booleanallScopesMustMatchprotected booleaninfoprotected java.util.ArrayList<java.lang.String>permissionsprotected java.util.ArrayList<java.lang.String>rolesprotected java.util.ArrayList<java.lang.String>scopes-
Fields inherited from class io.inversion.Rule
ALL_METHODS, configMap, description, excludeMatchers, excludeOn, includeMatchers, includeOn, log, name, order, params
-
-
Constructor Summary
Constructors Constructor Description AclRule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AclRuleallowAll(java.lang.String includedOn)java.util.ArrayList<java.lang.String>getPermissions()java.util.ArrayList<java.lang.String>getRoles()java.util.ArrayList<java.lang.String>getScopes()booleanisAllow()booleanisAllPermissionsMustMatch()booleanisAllRolesMustMatch()booleanisAllScopesMustMatch()booleanisInfo()static AclRulerequireAllPerms(java.lang.String permissions, java.lang.String... includedOn)static AclRulerequireAllRoles(java.lang.String roles, java.lang.String... includedOn)static AclRulerequireAllScopes(java.lang.String scopes, java.lang.String... includedOn)static AclRulerequireOnePerm(java.lang.String permissions, java.lang.String... includedOn)static AclRulerequireOneRole(java.lang.String roles, java.lang.String... includedOn)static AclRulerequireOneScope(java.lang.String scopes, java.lang.String... includedOn)booleanruleMatches(Request req)AclRulewithAllow(boolean allow)AclRulewithAllPermissionsMustMatch(boolean allPermissionsMustMatch)AclRulewithAllRolesMustMatch(boolean allRolesMustMatch)AclRulewithAllScopesMustMatch(boolean allScopesMustMatch)AclRulewithInfo(boolean info)AclRulewithPermissions(java.lang.String... permissions)AclRulewithRoles(java.lang.String... roles)AclRulewithScopes(java.lang.String... scopes)-
Methods inherited from class io.inversion.Rule
afterWiringComplete, checkLazyConfig, compareTo, doLazyConfig, getAllExcludePaths, getAllIncludeMethods, getAllIncludePaths, getDefaultIncludeMatchers, getDescription, getExcludeMatchers, getIncludeMatchers, getName, getOrder, getParams, match, match, matches, matches, toString, withDescription, withExcludeOn, withExcludeOn, withIncludeOn, withIncludeOn, withName, withOrder, withParam, withParams
-
-
-
-
Field Detail
-
permissions
protected final java.util.ArrayList<java.lang.String> permissions
-
roles
protected final java.util.ArrayList<java.lang.String> roles
-
scopes
protected final java.util.ArrayList<java.lang.String> scopes
-
allow
protected boolean allow
-
info
protected boolean info
-
allRolesMustMatch
protected boolean allRolesMustMatch
-
allPermissionsMustMatch
protected boolean allPermissionsMustMatch
-
allScopesMustMatch
protected boolean allScopesMustMatch
-
-
Method Detail
-
allowAll
public static AclRule allowAll(java.lang.String includedOn)
-
requireAllPerms
public static AclRule requireAllPerms(java.lang.String permissions, java.lang.String... includedOn)
-
requireOnePerm
public static AclRule requireOnePerm(java.lang.String permissions, java.lang.String... includedOn)
-
requireAllRoles
public static AclRule requireAllRoles(java.lang.String roles, java.lang.String... includedOn)
-
requireOneRole
public static AclRule requireOneRole(java.lang.String roles, java.lang.String... includedOn)
-
requireAllScopes
public static AclRule requireAllScopes(java.lang.String scopes, java.lang.String... includedOn)
-
requireOneScope
public static AclRule requireOneScope(java.lang.String scopes, java.lang.String... includedOn)
-
ruleMatches
public boolean ruleMatches(Request req)
-
getRoles
public java.util.ArrayList<java.lang.String> getRoles()
-
withRoles
public AclRule withRoles(java.lang.String... roles)
-
getPermissions
public java.util.ArrayList<java.lang.String> getPermissions()
-
withPermissions
public AclRule withPermissions(java.lang.String... permissions)
-
getScopes
public java.util.ArrayList<java.lang.String> getScopes()
-
withScopes
public AclRule withScopes(java.lang.String... scopes)
-
isAllow
public boolean isAllow()
-
withAllow
public AclRule withAllow(boolean allow)
-
isInfo
public boolean isInfo()
-
withInfo
public AclRule withInfo(boolean info)
-
isAllRolesMustMatch
public boolean isAllRolesMustMatch()
-
withAllRolesMustMatch
public AclRule withAllRolesMustMatch(boolean allRolesMustMatch)
-
isAllPermissionsMustMatch
public boolean isAllPermissionsMustMatch()
-
withAllPermissionsMustMatch
public AclRule withAllPermissionsMustMatch(boolean allPermissionsMustMatch)
-
isAllScopesMustMatch
public boolean isAllScopesMustMatch()
-
withAllScopesMustMatch
public AclRule withAllScopesMustMatch(boolean allScopesMustMatch)
-
-