Class PermissionReader
java.lang.Object
fr.gouv.vitam.ihmdemo.common.utils.PermissionReader
read permission of resources class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfilterPermission
(Collection<String> permissions, org.apache.shiro.subject.Subject subject) filter permissions for a specific usergetMethodsAnnotatedWith
(Class<?> type, Class<? extends org.apache.shiro.authz.annotation.RequiresPermissions> annotation) return the all permissions for vitam
-
Constructor Details
-
PermissionReader
public PermissionReader()
-
-
Method Details
-
getMethodsAnnotatedWith
public static Set<String> getMethodsAnnotatedWith(Class<?> type, Class<? extends org.apache.shiro.authz.annotation.RequiresPermissions> annotation) return the all permissions for vitam- Parameters:
type
-annotation
-- Returns:
- set of String
-
filterPermission
public static List<String> filterPermission(Collection<String> permissions, org.apache.shiro.subject.Subject subject) filter permissions for a specific user- Parameters:
permissions
-subject
-- Returns:
- list of String
-