Options for managing Entitlements in AdapTable.
Full - Fully visible and editable
Hidden - Completely hidden from the user - does not appear in any menus, toolbars, tool panels etc.
Entitlements Options Properties
Entitlements Options contains just 2 properties:
|defaultAccessLevel||AccessLevel to use when an Entitlement is not explicitly set||'Full'|
|moduleEntitlements||Returns either collection of |
Default Access Level
By default every Module has the Entitlement of Full
If this is not the required behaviour then setting
defaultAccessLevel to 'Hidden' will automatically remove all Modules, and then only those explicity permissioned (in
moduleEntitlements) will be available.
defaultAccessLevel is set to 'Hidden', make sure to enable the Dashboard for access to Toolbars
moduleEntitlements property offers 2 ways to provide Entitlements:
This provides a collection of Entitlement objects, each of which is defined as follows:
|accessLevel||Access Level for an Entitlement; options are: 'Full', ''ReadOnly', 'Hidden'|
|adaptableModule||Name of Adaptable Module that has the Entitlement applied|
Using Custom Function
An alternative to a list of Entitlements is to provide a custom function implementation.
This function will be invoked each time an Entitlement is checked returing the apppropriate Access Level
You can use this function to query permissions stored remotely and which might update in real time
Some AdapTable Modules require additional conditions for it to be available in addition to setting the Entitlement.
These are usually supplied in Predefined Config or Adaptable Options. These include:
Team Sharing: the
enableTeamSharingproperty must be set to true in TeamSharingOptions
glue42: the glue42 Predefined Config must contain the glue42 object
ipushpull: the ipushpull Predefined Config must contain the ipushpull object
Entitlements work at the UI Level only.
This means that AdapTable will ensure that end users cannot see or access - throughout the AdapTable UI - elements like menus, toolbars, popups etc. in Functions to which they are not entitled.
However the Adaptable Api does not take notice of Entitlements, so anything that is managed programatically through code will ignore the User's entitlements.
To ensure that the Adaptable Api is not called for functions to which the user has no access, use the
getEntitlementAccessLevelForModule in Grid Api
Sometimes the Module level restriction of Entitlements is insufficient; e.g. a use case requires a Module to have a 'Full' entitlement (i.e. it's editable) but one particular object must be ReadOnly (i.e. cannot be deleted).
There is no property for the opposite use case - where the Module's Entitlement is 'ReadOnly' but one AdaptTable object should be 'Full'
See Adaptable Objects for more.