Interface PermissionService
-
- All Superinterfaces:
LifecycleService
,TenantLifecycleService
- All Known Implementing Classes:
PermissionServiceImpl
public interface PermissionService extends TenantLifecycleService
- Author:
- Baptiste Mesta
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROFILE_TYPE_AUTHORIZATION_PREFIX
static java.lang.String
SCRIPT_TYPE_AUTHORIZATION_PREFIX
static java.lang.String
USER_TYPE_AUTHORIZATION_PREFIX
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addPermissions(java.lang.String pageName, java.util.Properties pageProperties)
boolean
checkAPICallWithScript(java.lang.String className, org.bonitasoft.engine.api.permission.APICallContext context, boolean reload)
execute thePermissionRule
having the class name in parameter using the given contextjava.util.Set<java.lang.String>
getResourcePermissions(java.lang.String resourceKey)
boolean
isAuthorized(org.bonitasoft.engine.api.permission.APICallContext apiCallContext)
void
removePermissions(java.util.Properties pageProperties)
-
Methods inherited from interface org.bonitasoft.engine.commons.LifecycleService
pause, resume, start, stop
-
Methods inherited from interface org.bonitasoft.engine.commons.TenantLifecycleService
init
-
-
-
-
Field Detail
-
USER_TYPE_AUTHORIZATION_PREFIX
static final java.lang.String USER_TYPE_AUTHORIZATION_PREFIX
- See Also:
- Constant Field Values
-
PROFILE_TYPE_AUTHORIZATION_PREFIX
static final java.lang.String PROFILE_TYPE_AUTHORIZATION_PREFIX
- See Also:
- Constant Field Values
-
SCRIPT_TYPE_AUTHORIZATION_PREFIX
static final java.lang.String SCRIPT_TYPE_AUTHORIZATION_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
checkAPICallWithScript
boolean checkAPICallWithScript(java.lang.String className, org.bonitasoft.engine.api.permission.APICallContext context, boolean reload) throws SExecutionException, java.lang.ClassNotFoundException
execute thePermissionRule
having the class name in parameter using the given context- Parameters:
className
- the class name of the rule to executecontext
- the context of the api call to checkreload
- reload class when calling this method, warning if some class were called with reload set to false, they will never be reloadable- Returns:
- true if the security script allows the user to make the api call
- Throws:
SExecutionException
java.lang.ClassNotFoundException
-
isAuthorized
boolean isAuthorized(org.bonitasoft.engine.api.permission.APICallContext apiCallContext) throws SExecutionException
- Throws:
SExecutionException
-
addPermissions
void addPermissions(java.lang.String pageName, java.util.Properties pageProperties)
-
removePermissions
void removePermissions(java.util.Properties pageProperties)
-
getResourcePermissions
java.util.Set<java.lang.String> getResourcePermissions(java.lang.String resourceKey)
-
-