Class AdminWorkgroupService
java.lang.Object
fr.paris.lutece.portal.service.workgroup.AdminWorkgroupService
AdminWorkgroupService
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource>
Collection<E>getAuthorizedCollection(Collection<E> collection, fr.paris.lutece.api.user.User user) Filter a collection of resources for a given userstatic <E extends fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource>
Collection<E>getAuthorizedCollection(Collection<E> collection, AdminUser user) Deprecated.use getAuthorizedCollection( Collection, User )static ReferenceListgetUserWorkgroups(AdminUser user, Locale locale) Gets all workgroups of the userstatic booleanisAuthorized(fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource resource, fr.paris.lutece.api.user.User user) Check if a resource should be visible to the user according its workgroupstatic booleanisAuthorized(fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource resource, AdminUser user) Deprecated.use isAuthorized( AdminWorkgroupResource, User )static StringnormalizeWorkgroupKey(String strAdminWorkgroup) Normalized an empty or null workgroup key
-
Field Details
-
ALL_GROUPS
- See Also:
-
-
Method Details
-
isAuthorized
public static boolean isAuthorized(fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource resource, fr.paris.lutece.api.user.User user) Check if a resource should be visible to the user according its workgroup- Parameters:
resource- The resource to checkuser- The current user- Returns:
- true if authorized, otherwise false
-
isAuthorized
@Deprecated public static boolean isAuthorized(fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource resource, AdminUser user) Deprecated.use isAuthorized( AdminWorkgroupResource, User )Check if a resource should be visible to the user according its workgroup- Parameters:
resource- The resource to checkuser- The current user- Returns:
- true if authorized, otherwise false
-
getAuthorizedCollection
public static <E extends fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource> Collection<E> getAuthorizedCollection(Collection<E> collection, fr.paris.lutece.api.user.User user) Filter a collection of resources for a given user- Type Parameters:
E- The workgroup resource- Parameters:
collection- The collection to filteruser- The user- Returns:
- A filtered collection of resources
-
getAuthorizedCollection
@Deprecated public static <E extends fr.paris.lutece.portal.service.workgroup.AdminWorkgroupResource> Collection<E> getAuthorizedCollection(Collection<E> collection, AdminUser user) Deprecated.use getAuthorizedCollection( Collection, User )Filter a collection of resources for a given user- Type Parameters:
E- The workgroup resource- Parameters:
collection- The collection to filteruser- The user- Returns:
- A filtered collection of resources
-
getUserWorkgroups
Gets all workgroups of the user- Parameters:
user- The current userlocale- The Locale- Returns:
- A list of workgroup
-
normalizeWorkgroupKey
Normalized an empty or null workgroup key- Parameters:
strAdminWorkgroup- The workgroup key to normalize- Returns:
- The workgroup key normalized
-