Products | Versions |
---|---|
TIBCO EBX | All versions from 5.8.0. |
Since EBX 5.8.0, it is possible to declare programmatic permissions on a dataset built-in services such as :
These allow to define dynamic permissions that depend on the current selection and/or the current user session for example.
For a given service you will have to declare a ServicePermissionRule in a SchemaExtensions the same way you declare access rules on nodes.
public class MySchemaExtensions implements SchemaExtensions{ public void defineExtensions(SchemaExtensionsContext aContext) { //Declare a permission rule on the association node /root/table/asso. aContext.setServicePermissionRuleOnNode(Path.parse( "/root/table/asso" ), ServiceKey.CREATE, new CreateServiceRule()); } private class CreateServiceRule implements ServicePermissionRule<AssociationEntitySelection>{ public UserServicePermission getPermission( ServicePermissionRuleContext<AssociationEntitySelection> aContext) { return UserServicePermission.getDisabled(); } } } |
In this example: