Evoke Access Control

Evoke offers Access Control to provide completely unique App experiences for each user, based on their user group/level or data (either entered or retrieved from the database). Access control allows you to provide different security levels for different users, provide unique navigation routes through the app, show/hide different menu options for different groups, show/hide different data or information on pages, follow different paths through the app, or enable/disable control of a function such
as a menu item, so the user can see it but maybe not use it until they upgrade to a premium account or similar.
When you set up either user group access control or data based access control for for menu items, page components, properties in a template, etc the access control summary box will show either “Controlled via User Groups” or “Controlled via Data” to show that an access control has been set for this menu/page component/etc and which type it is.

Setting Up Access Control User Groups
First you need to define the different user groups you want.
This is done in App Settings.
Once you have set up some Access Control user groups in App Settings, you will need to allocate users of your App to these user groups. This is done in your database in the AppUser record (AppUser Entity), you can add one or multiple access control user groups to the AppUser record (these should be exactly the same names as you entered in App Settings e.g. Customer, Manager, Salesteam, Accounts Department, etc as shown in the example on the right).

The User Groups in your database should be mapped (in Data Mappings) on to the AppUserGroup property as defined in the Reserved Entities section.

User Groups Based
For each User Group that is defined in App Settings you can set the following options:
  • Visible if user is a member of any of these groups

  • Not Visible if user is a member of any of these groups

  • Enabled if user is a member of any of these groups

  • Not Enabled if user is a member of any of these groups

To add a Group, use the + symbol or elypsis menu option to add a new entry and select from the drop down list of groups that you have entered (set up) in App Settings
Please note that the visible/not visible options are mutually exclusive so if you have selected groups for an item to be visible then any groups in the not visible column will be ignored. The enabled/not enabled options are also mutually exclusive
Data Based
Data Based user access control works on tests and every menu option, Widget, Segment, etc can have the following Data Based (testing a field/property either input in the UI or retrieved from your database) tests to control its access/display:
  • Visible if any of the tests below are true

  • Not Visible if any of the tests below are true

  • Enabled if any of the tests below are true

  • Not Enabled if any of the tests below are true

To add a Data Source Property Path, use the + symbol or elypsis menu option to add a new entry and then use the DataSource Builder to select the specific property that you want to test.
Please note that the visible/not visible options are mutually exclusive so if you have selected groups for an item to be visible then any groups in the not visible column will be ignored. The enabled/not enabled options are also mutually exclusive
The tests are are based on a Data Source Property being tested against a test value i.e. a number, letters, {true}, etc based on any of the following Operators:
  • =   Is equal to

  • !=  Is not equal to

  • >   Is greater than

  • <   Is Less than

  • >= Is greater than or equal to

  • <=  Is less than or equal to

  • ]     Starts with

  • [     Ends with

  • []    Contains

     
Examples: If you are testing an alphanumeric field the test may be something like...
     Salesdatasource.current.Status = Live or
     Salesdatasource.current.Showname = Y
     note that you dont need " or ' - just the text
     
     If you are testing an boolean field the test may be something like...
     Salesdatasource.current.Live = {true} or
     Salesdatasource.current.Live = 1
     
     If you are testing a data field the test may be something like...
     Salesdatasource.current.Name = "Bob"      or
     Salesdatasource.current.Name = {Salesdatasource.current.SalesmanName} (which would test against the contents of the property SalesmanName)


The Test Value field is a free format data entry field but it can also include any of the special Evoke system values, which can be populated by the associated dropdown list. Examples of special system values are:
{true} = a Boolean true value
{false} = a Boolean false value
{blank} = a string with zero length
{empty} = a special "empty" instance of an entity type