Package org.silverpeas.cmis.security
Class GrantedAccessController
- java.lang.Object
-
- org.silverpeas.core.security.authorization.AbstractAccessController<String>
-
- org.silverpeas.cmis.security.GrantedAccessController
-
- All Implemented Interfaces:
AccessController<String>
public class GrantedAccessController extends AbstractAccessController<String>
Default implementation of the access controller that grants the access for any users and groups of users.- Author:
- mmoquillon
-
-
Constructor Summary
Constructors Constructor Description GrantedAccessController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isGroupAuthorized(String groupId, String object)
Is the specified group authorized to access the given object with at least read privileges?boolean
isUserAuthorized(String userId, String object, AccessControlContext context)
Checks if the specified user may access the specified object.boolean
isUserAuthorized(String userId, ResourceIdentifier id)
Checks if the specified user may access the object with the specified identifier.boolean
isUserAuthorized(Set<SilverpeasRole> userRoles)
Checks user authorization from the given role collection.-
Methods inherited from class org.silverpeas.core.security.authorization.AbstractAccessController
fillUserRoles, filterAuthorizedByUser, filterAuthorizedByUser, getUserRoles, isUserAuthorized
-
-
-
-
Method Detail
-
isUserAuthorized
public boolean isUserAuthorized(Set<SilverpeasRole> userRoles)
Description copied from interface:AccessController
Checks user authorization from the given role collection.- Parameters:
userRoles
- user roles.- Returns:
- true if user authorization, false otherwise.
-
isUserAuthorized
public boolean isUserAuthorized(String userId, ResourceIdentifier id)
Description copied from interface:AccessController
Checks if the specified user may access the object with the specified identifier.- Parameters:
userId
- the unique identifier of the user.id
- the unique identifier of the object to be accessed in Silverpeas.- Returns:
- true if access is granted - false otherwise.
-
isUserAuthorized
public boolean isUserAuthorized(String userId, String object, AccessControlContext context)
Description copied from interface:AccessController
Checks if the specified user may access the specified object.- Parameters:
userId
- the unique identifier of the user.object
- the object to be accessed.context
- the context in which the object is accessed.- Returns:
- true if access is granted - false otherwise.
-
isGroupAuthorized
public boolean isGroupAuthorized(String groupId, String object)
Description copied from interface:AccessController
Is the specified group authorized to access the given object with at least read privileges? The roles of the group on the object aren't taken into account. The group should have at least the user role to access the object unless the object is public.- Parameters:
groupId
- the unique identifier of a group.object
- the unique identifier of the object to be accessed.- Returns:
- true if the group can access the given object, false otherwise.
-
-