|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.portal.service.rbac.RBACService
public class RBACService
This class provides the main methods to control the access to a resource depending on the user's roles
Method Summary | |
---|---|
static java.util.Collection |
getAuthorizedActionsCollection(java.util.Collection<? extends RBACAction> collection,
RBACResource resource,
AdminUser user)
Filter a collection of RBACAction for a given user |
static java.util.Collection |
getAuthorizedCollection(java.util.Collection<? extends RBACResource> collection,
java.lang.String strPermission,
AdminUser user)
Filter a collection of resources for a given user |
static ReferenceList |
getAuthorizedReferenceList(ReferenceList listResources,
java.lang.String strResourceType,
java.lang.String strPermission,
AdminUser user)
Filter a Reference List for a given user |
static boolean |
isAuthorized(RBACResource resource,
java.lang.String strPermission,
AdminUser user)
Check that a given user is allowed to access a resource for a given permission |
static boolean |
isAuthorized(java.lang.String strResourceTypeCode,
java.lang.String strResourceId,
java.lang.String strPermission,
AdminUser user)
Check that a given user is allowed to access a resource for a given permission |
static boolean |
isUserInRole(AdminUser user,
java.lang.String strRole)
Check that a given user is in the given role |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean isAuthorized(java.lang.String strResourceTypeCode, java.lang.String strResourceId, java.lang.String strPermission, AdminUser user)
strResourceTypeCode
- the key of the resource type being consideredstrResourceId
- the id of the resource being consideredstrPermission
- the permission neededuser
- the user trying to access the ressource
public static boolean isAuthorized(RBACResource resource, java.lang.String strPermission, AdminUser user)
resource
- the resource object being consideredstrPermission
- the permission neededuser
- the user trying to access the ressource
public static boolean isUserInRole(AdminUser user, java.lang.String strRole)
user
- strRole
-
public static java.util.Collection getAuthorizedCollection(java.util.Collection<? extends RBACResource> collection, java.lang.String strPermission, AdminUser user)
collection
- The collection to filterstrPermission
- Permission to checkuser
- The user
public static ReferenceList getAuthorizedReferenceList(ReferenceList listResources, java.lang.String strResourceType, java.lang.String strPermission, AdminUser user)
listResources
- The list to filterstrResourceType
- The resource typestrPermission
- The permission to checkuser
- The user
public static java.util.Collection getAuthorizedActionsCollection(java.util.Collection<? extends RBACAction> collection, RBACResource resource, AdminUser user)
collection
- The collection to filterresource
- The resourceuser
- The user
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |