public interface PermissionAPI
Modifier and Type | Method and Description |
---|---|
boolean |
checkAPICallWithScript(String className,
APICallContext apiCallContext,
boolean reload)
Execute a groovy class stored in bonita-home/server/tenants/<tenant id>/conf/security-scripts/ using it's class name
|
boolean checkAPICallWithScript(String className, APICallContext apiCallContext, boolean reload) throws ExecutionException, NotFoundException
The class MUST implements PermissionRule
If the script is executed without exceptions it means that the user
is authorized to access the resource.
The class must be put by hand in the bonita home folder bonita-home/server/tenants/<tenant id>/conf/security-scripts/<scriptName>.groovy
You can also add jar containing class implementing PermissionRule
and execute them using their class name.
className
- the name of the class of the ruleapiCallContext
- the context of the api callreload
- reload class when calling this method, warning if some class were called with reload set to false, they will never be reloadableExecutionException
- If there is an exception while executing the scriptNotFoundException
Copyright © 2016 Bonitasoft S.A.. All rights reserved.