|
||||||||||
| 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 final class RBACService
This class provides the main methods to control the access to a resource depending on the user's roles
| Method Summary | ||
|---|---|---|
static
|
getAuthorizedActionsCollection(Collection<E> collection,
fr.paris.lutece.portal.service.rbac.RBACResource resource,
AdminUser user)
Filter a collection of RBACAction for a given user |
|
static
|
getAuthorizedCollection(Collection<E> collection,
String strPermission,
AdminUser user)
Filter a collection of resources for a given user |
|
static ReferenceList |
getAuthorizedReferenceList(ReferenceList listResources,
String strResourceType,
String strPermission,
AdminUser user)
Filter a Reference List for a given user |
|
static boolean |
isAuthorized(fr.paris.lutece.portal.service.rbac.RBACResource resource,
String strPermission,
AdminUser user)
Check that a given user is allowed to access a resource for a given permission |
|
static boolean |
isAuthorized(String strResourceTypeCode,
String strResourceId,
String strPermission,
AdminUser user)
Check that a given user is allowed to access a resource for a given permission |
|
static boolean |
isUserInRole(AdminUser user,
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(String strResourceTypeCode,
String strResourceId,
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(fr.paris.lutece.portal.service.rbac.RBACResource resource,
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,
String strRole)
user - The userstrRole - The role
public static <E extends fr.paris.lutece.portal.service.rbac.RBACResource> Collection<E> getAuthorizedCollection(Collection<E> collection,
String strPermission,
AdminUser user)
E - The RBAC resourcecollection - The collection to filterstrPermission - Permission to checkuser - The user
public static ReferenceList getAuthorizedReferenceList(ReferenceList listResources,
String strResourceType,
String strPermission,
AdminUser user)
listResources - The list to filterstrResourceType - The resource typestrPermission - The permission to checkuser - The user
public static <E extends fr.paris.lutece.portal.service.rbac.RBACAction> Collection<E> getAuthorizedActionsCollection(Collection<E> collection,
fr.paris.lutece.portal.service.rbac.RBACResource resource,
AdminUser user)
E - The RBAC resourcecollection - The collection to filterresource - The resourceuser - The user
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||