Package org.ametys.core.right
Enum AccessController.AccessResult
- java.lang.Object
-
- java.lang.Enum<AccessController.AccessResult>
-
- org.ametys.core.right.AccessController.AccessResult
-
- All Implemented Interfaces:
Serializable
,Comparable<AccessController.AccessResult>
- Enclosing interface:
- AccessController
public static enum AccessController.AccessResult extends Enum<AccessController.AccessResult>
The access result when looking for a right
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANONYMOUS_ALLOWED
If the user is allowed because the right is allowed for any anonymous userANONYMOUS_DENIED
If the user is denied because the right is denied for any anonymous userANY_CONNECTED_ALLOWED
If the user is allowed because the right is allowed for any connected userANY_CONNECTED_DENIED
If the user is denied because the right is denied for any connected userGROUP_ALLOWED
If the user is allowed through its groups and not directlyGROUP_DENIED
If the user is denied through its groups and not directlyUNKNOWN
Cannot determineUSER_ALLOWED
If the user is directly allowedUSER_DENIED
If the user is directly denied
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AccessController.AccessResult
merge(Collection<AccessController.AccessResult> accessResults)
Merge several access results to keep only the more importantstatic AccessController.AccessResult
merge(AccessController.AccessResult... accessResults)
Merge several access results to keep only the more importantRightManager.RightResult
toRightResult()
Convert the value to an access resultstatic AccessController.AccessResult
valueOf(String name)
Returns the enum constant of this type with the specified name.static AccessController.AccessResult[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ANONYMOUS_ALLOWED
public static final AccessController.AccessResult ANONYMOUS_ALLOWED
If the user is allowed because the right is allowed for any anonymous user
-
USER_DENIED
public static final AccessController.AccessResult USER_DENIED
If the user is directly denied
-
USER_ALLOWED
public static final AccessController.AccessResult USER_ALLOWED
If the user is directly allowed
-
GROUP_DENIED
public static final AccessController.AccessResult GROUP_DENIED
If the user is denied through its groups and not directly
-
GROUP_ALLOWED
public static final AccessController.AccessResult GROUP_ALLOWED
If the user is allowed through its groups and not directly
-
ANY_CONNECTED_DENIED
public static final AccessController.AccessResult ANY_CONNECTED_DENIED
If the user is denied because the right is denied for any connected user
-
ANY_CONNECTED_ALLOWED
public static final AccessController.AccessResult ANY_CONNECTED_ALLOWED
If the user is allowed because the right is allowed for any connected user
-
ANONYMOUS_DENIED
public static final AccessController.AccessResult ANONYMOUS_DENIED
If the user is denied because the right is denied for any anonymous user
-
UNKNOWN
public static final AccessController.AccessResult UNKNOWN
Cannot determine
-
-
Method Detail
-
values
public static AccessController.AccessResult[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AccessController.AccessResult c : AccessController.AccessResult.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AccessController.AccessResult valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
toRightResult
public RightManager.RightResult 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
public static AccessController.AccessResult merge(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
-
-