Class PermissionRule.SetLevel
Object
PermissionRule
SetLevel
- All Implemented Interfaces:
Cloneable
- Enclosing class:
- PermissionRule
This rule sets the permission level to a specific value in case the user matches
PermissionSubject.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class PermissionRule
PermissionRule.ApplyStructure, PermissionRule.SetLevel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ApplicationUser user, PermissionLevel pass, List<Object> callStack, La<Long, List<PermissionRule>> resolver) Apply permission rule and return the result.clone()booleangetLevel()inthashCode()voidsetLevel(PermissionLevel level) voidsetSubject(PermissionSubject subject) Methods inherited from class PermissionRule
decodePermissions, encodePermissions, fromEncodedString, fromEncodedString, toString
-
Constructor Details
-
SetLevel
public SetLevel() -
SetLevel
-
-
Method Details
-
clone
- Overrides:
clonein classPermissionRule- Returns:
- a cloned version of this rule
-
apply
@NotNull public PermissionLevel apply(ApplicationUser user, @NotNull PermissionLevel pass, List<Object> callStack, La<Long, List<PermissionRule>> resolver) Description copied from class:PermissionRuleApply permission rule and return the result.
Normally you should not call this method directly - call
Structure.getEffectivePermission()instead.- Specified by:
applyin classPermissionRule- Parameters:
user- the user, null means anonymouspass- the default value, which is returned in case this rule does not applycallStack- auxiliary container for objects used to check for recursive rulesresolver- auxiliary function that converts structure ID into associated list of permission rules - used byPermissionRule.ApplyStructure. If null,PermissionRule.ApplyStructurewill not be able to apply and return pass value.- Returns:
- permission level for the passed user
-
getSubject
-
setSubject
-
getLevel
-
setLevel
-
toEncodedString
- Specified by:
toEncodedStringin classPermissionRule- Returns:
- a string representation of this permission rule
- See Also:
-
equals
-
hashCode
public int hashCode()
-