public static class PermissionRule.SetLevel extends PermissionRule
PermissionSubject
.PermissionSubject
PermissionRule.ApplyStructure, PermissionRule.SetLevel
Constructor and Description |
---|
SetLevel() |
SetLevel(PermissionSubject subject,
PermissionLevel level) |
Modifier and Type | Method and Description |
---|---|
PermissionLevel |
apply(ApplicationUser user,
PermissionLevel pass,
List<Object> callStack,
La<Long,List<PermissionRule>> resolver)
Apply permission rule and return the result.
|
PermissionRule.SetLevel |
clone() |
boolean |
equals(Object o) |
PermissionLevel |
getLevel() |
PermissionSubject |
getSubject() |
int |
hashCode() |
void |
setLevel(PermissionLevel level) |
void |
setSubject(PermissionSubject subject) |
String |
toEncodedString() |
decodePermissions, encodePermissions, fromEncodedString, fromEncodedString, toString
public SetLevel()
public SetLevel(PermissionSubject subject, PermissionLevel level)
public PermissionRule.SetLevel clone()
clone
in class PermissionRule
@NotNull public PermissionLevel apply(ApplicationUser user, @NotNull PermissionLevel pass, List<Object> callStack, La<Long,List<PermissionRule>> resolver)
PermissionRule
Apply permission rule and return the result.
Normally you should not call this method directly - call
Structure.getEffectivePermission()
instead.
apply
in class PermissionRule
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 by PermissionRule.ApplyStructure
. If null, PermissionRule.ApplyStructure
will not be able to apply and return pass value.public PermissionSubject getSubject()
public void setSubject(PermissionSubject subject)
public PermissionLevel getLevel()
public void setLevel(PermissionLevel level)
public String toEncodedString()
toEncodedString
in class PermissionRule
PermissionRule.fromEncodedString(java.lang.String)
Copyright © 2024 Tempo Software. All Rights Reserved.