Package org.cyclos.impl.access
Interface AuthHandler
-
- All Known Implementing Classes:
AuthHandlerImpl
public interface AuthHandlerHandles authentication and authorization for the current logged user
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UserRelationshipgetRelationship(BasicUser basicUser, BasicUser related)Returns the relationship level between 2 usersCollection<?>getRequiredValues(Permission permission)Returns the required values to be enforced on the given permission.booleanisAdminOf(User admin, BasicUser user)Returns whether the given user is an administrator of the given userbooleanisBrokerOf(BasicUser broker, BasicUser user)Returns whether the given user is a broker of the given userbooleanmanages(BasicUser manager, BasicUser basicUser)Returns whether the first user manages the second userUserPermissionCheckpermission(BasicUser user)Returns anUserPermissionCheckfor the logged user over the given userPermissionCheckpermission(Permission permission)Returns aPermissionCheckfor the logged user with a permission which is not related to usersUserPermissionCheckpermissionOptionalValue(BasicUser user)Returns anUserPermissionCheckfor the logged user over the given user, optionally checking related valuesPermissionCheckpermissionOptionalValue(Permission permission)Returns aPermissionCheckwhich can check any type of permission and, optionally, related values.booleanrelatesTo(BasicUser basicUser, BasicUser related)Returns whether the first user is related to (is allowed to view) the second userbooleanrequiresValues(Permission permission)Returns whether the given permission would require a value check for the currently logged user
-
-
-
Method Detail
-
getRelationship
UserRelationship getRelationship(BasicUser basicUser, BasicUser related)
Returns the relationship level between 2 users
-
getRequiredValues
Collection<?> getRequiredValues(Permission permission)
Returns the required values to be enforced on the given permission. Required values are obtained from permissions which are granted / denied according to a collection of related entities on products. For example, the permission to perform a payment comes from having related payment types.
-
isAdminOf
boolean isAdminOf(User admin, BasicUser user)
Returns whether the given user is an administrator of the given user
-
isBrokerOf
boolean isBrokerOf(BasicUser broker, BasicUser user)
Returns whether the given user is a broker of the given user
-
manages
boolean manages(BasicUser manager, BasicUser basicUser)
Returns whether the first user manages the second user
-
permission
UserPermissionCheck permission(BasicUser user)
Returns anUserPermissionCheckfor the logged user over the given user
-
permission
PermissionCheck permission(Permission permission)
Returns aPermissionCheckfor the logged user with a permission which is not related to users
-
permissionOptionalValue
UserPermissionCheck permissionOptionalValue(BasicUser user)
Returns anUserPermissionCheckfor the logged user over the given user, optionally checking related values
-
permissionOptionalValue
PermissionCheck permissionOptionalValue(Permission permission)
Returns aPermissionCheckwhich can check any type of permission and, optionally, related values. Never checks users.
-
relatesTo
boolean relatesTo(BasicUser basicUser, BasicUser related)
Returns whether the first user is related to (is allowed to view) the second user
-
requiresValues
boolean requiresValues(Permission permission)
Returns whether the given permission would require a value check for the currently logged user
-
-