Module Entitlements

Summary

  • Every Module in AdapTable can be given one of 3 Access Levels:

    • ReadOnly
    • Hidden
    • Full
  • Module Entitlements can be provided in 2 ways:

    • as a 'hard-coded list'
    • via a function
  • Additionally a different DefaultAccessLevel can be specified in preference to the default value of Full

Every Module in AdapTable has an Entitlement AccessLevel.

Note

Any Module not given an explicit Entitlement will use that provided by the defaultAccessLevel property

Caution

In addition any Object-level Entitlements will take priority over the Module Entitlement

This is set by the moduleEntitlements property of Entitlement Options and can provided in 2 ways:

  • with a 'hard-coded' list
  • via a function invoked by AdapTable as required

moduleEntitlements

Provide Entitlements for each Module

List-based Module Entitlements

The most straightforward way of providing Module Entitlements is via a list.

The list includes every Entitlement for which the defaultAccessLevel is not suitable.

Entitlements: By List
Fork
  • In this example we have provided Entitlements using a List (see below) as follows:
    • The Alerts Module has a Readonly Entitlement - Alerts can be triggered (change GitHub Stars to under 500) but not edited, deleted or created
    • The Format Column Module has a Readonly Entitlement - 3 Format Columns are rendered but cannot be edited, deleted or created
    • The Custom Sort Module has a Hidden Entitlement - it is invisible in all UI elements

See how the Permissions are set as a List

Try It Out
  • Open the Settings Panel and note that Format Columns and Alert objects are disabled and Custom Sort is missing
  • Fork the example and change the Entitlement of Alert to Hidden

Function-based Module Entitlements

An alternative way of providing Module Entitlements is via a JavaScript function.

This function will be invoked by AdapTable each time an Entitlement needs to be evaluated.

This is a more powerful and flexible approach than a hard coded value as it can return different AccessLevel values depending on the User, or other information.

Hint

You can use this option to connect to an external permisssioning or entitlement service if required

Deep Dive

Providing Module Entitlements by Function

Caution

  • The function must return an AccessLevel in all circumstances.
  • AdapTable will not revert to the Default Access Level if no Access Level is returned from the function
Entitlements: By Function
Fork
  • This example uses a function to define permissions for Modules
  • Based on the user-access-level, they can have Full, ReadOnly or Hidden access

Expand to see the moduleEntitlements function

Try It Out
  • Fork the example and change the entitlement function to make Alert module visible.

Additional Module Entitlement Rules

For some AdapTable Modules providing an Entitlement of Full or ReadOnly is insufficient to ensure availability.

Additional conditions are required - supplied typically in Adaptable Options:

Default Module ReadOnly Behaviour

The ReadOnly behaviour for an Entitlement differs by Module and use case.

As a general rule, if the Module performs an action but does not contain an object (e.g. Smart Edit, Bulk Update or Cell Summary) the behaviour is the same as for Hidden.

If the Module contains a collection of objects (e.g. Format Columns, Shortcuts, Custom Sort), these objects are actionable as needed (and fully viewable by the user) but cannot be edited, deleted or suspended; nor can new ones be added.

However items can be selected in Modules where Users are able to make a selection (e.g. Layout or Export).

Caution

Objects provided in Initial Adaptable State are fully available in ReadOnly mode, as is the Adaptable API

There are some special cases to be aware of, here is full ReadOnly Entitlement behaviour for each Module:

ModuleRead Only Behaviour
AlertsAlerts trigger as normal but users cannot manage or suspend Alert Definitions; Alerts may be still cleared however.
Bulk UpdateSame as Hidden Access Level
Calculated ColumnCalculated Columns can be added / removed from Layouts and will be applied but Users cannot manage or suspend them
Cell SummarySame as Hidden Access Level
ChartsSame as Full Access Level (charts are managed by AG Grid)
Column FiltersThe Filter Bar cannot be made hidden / visible but Column Filters can still be created
CommentsExisting Comments - either previously created or provided by other users are visible - but new Comments cannot be added
Custom SortCustom Sorts will be applied but Users cannot manage or suspend them
DashboardThe Dashboard cannot be configured (but can be expanded / hidden / floated etc.). Individual Toolbars cannot be closed or re-ordered.
Data Change HistoryData Change History will display and work (if active) but it cannot be activated, inactivated or suspended
Data SetsPredefined Data Sets can be selected - and the DataSetSelected Event will fire - but Users cannot manage or suspend them
ExportReports can be run but Users cannot manage or suspend them
FDC3Same as Hidden Access Level
Format ColumnFormat Columns will be applied but Users cannot manage or suspend them
FreeText ColumnFreeText Columns can be added / removed from Layouts and visible in the Grid (with cells fully editable) but Users cannot manage or suspend them
Grid FilterExisting Named Queries can be run in the Grid Filter but new Named Queries cannot be saved
Grid InfoSame as Hidden Access Level
LayoutPredefined Layouts can be selected but Users cannot actively manage or suspend them; Column changes can be made at runtime but they are not persisted
NotesNotes in Initial State are visible, but Notes cannot be added, edited or deleted
Plus MinusPlus Minus Nudges will be applied but Users cannot manage or suspend them
Quick SearchSame as Hidden Access Level
ScheduleSchedules will be run as specified, but Users cannot manage or suspend them
Settings PanelSame as Full Access Level
ShortcutsShortcuts will be applied but Users cannot manage or suspend them
Smart EditSame as Hidden Access Level
State ManagementThe 'Retrieve State' dropdowns operate but the 'Delete State' button is disabled
Status BarStatus Bar Panels can be used but the Status Bar cannot be configured
Styled ColumnStyled Columns will be rendered but Users cannot manage or suspend them
System StatusSystem Status Messages can be viewed, but the 'Delete' buttons are disabled
Team SharingUsers may import existing Shared items, but are not able to create or delete them
ThemeThe Theme cannot be changed
Tool PanelThe Adaptable Tool Panel cannot be configured. Individual ToolPanels can be opened and closed but not hidden or re-ordered.

Plugin-based Modules

PluginRead Only Behaviour
ipushpullSame as Hidden Access Level
OpenFinSame as Hidden Access Level
interop.ioThere are no Entitlements