Package org.ametys.core.right
Enum Class AccessController.AccessResult
- All Implemented Interfaces:
Serializable
,Comparable<AccessController.AccessResult>
,java.lang.constant.Constable
- Enclosing interface:
- AccessController
The access result when looking for a right
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIf the user is allowed because the right is allowed for any anonymous userIf the user is denied because the right is denied for any anonymous userIf the user is allowed because the right is allowed for any connected userIf the user is denied because the right is denied for any connected userIf the user is allowed through its groups and not directlyIf the user is denied through its groups and not directlyCannot determineIf the user is directly allowedIf the user is directly denied -
Method Summary
Modifier and TypeMethodDescriptionmerge
(Collection<AccessController.AccessResult> accessResults) Merge several access results to keep only the more importantmerge
(AccessController.AccessResult... accessResults) Merge several access results to keep only the more importantConvert the value to an access resultReturns the enum constant of this class with the specified name.static AccessController.AccessResult[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ANONYMOUS_ALLOWED
If the user is allowed because the right is allowed for any anonymous user -
USER_DENIED
If the user is directly denied -
USER_ALLOWED
If the user is directly allowed -
GROUP_DENIED
If the user is denied through its groups and not directly -
GROUP_ALLOWED
If the user is allowed through its groups and not directly -
ANY_CONNECTED_DENIED
If the user is denied because the right is denied for any connected user -
ANY_CONNECTED_ALLOWED
If the user is allowed because the right is allowed for any connected user -
ANONYMOUS_DENIED
If the user is denied because the right is denied for any anonymous user -
UNKNOWN
Cannot determine
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
toRightResult
Convert the value to an access result- Returns:
- denied enumerated will be converted to deny, allow to allow and unknown to unknown
-
merge
public static AccessController.AccessResult merge(Collection<AccessController.AccessResult> accessResults) Merge several access results to keep only the more important- Parameters:
accessResults
- The access results to merge. Cannot be null but can be empty.- Returns:
- The more important access result
-
merge
Merge several access results to keep only the more important- Parameters:
accessResults
- The access results to merge. Cannot be null but can be empty.- Returns:
- The more important access result
-