Using role lookup keys
- Tutorial
Setting up role lookup keys.
- Background
A lookup key is simply a key-value pair that can be used as a value for record-level access control settings in a role.
- Example - Use lookup keys for record-level access control
1. Log into the DreamFactory admin console as an Admin.
2. Click on 'Roles' > 'Create'.
3. In the 'Access' tab, select your SQL database API for 'Service', the table name for 'Component', HTTP verbs for 'Access', and both API and Script for 'Requestor'. Repeat for each table and script you are exposing to this role.
In this example, we've exposed API access to the Contact table itself and also allowed event scripts to run for API calls to the Contact table.
- Example - Enable HTTP access to only event scripts for a role.
1. Log into the DreamFactory admin console as an Admin.
2. Click on 'Roles' > 'Create'.
3. In the 'Access' tab, select your SQL database API for 'Service', the table name for 'Component', HTTP verbs for 'Access', and Script for 'Requestor'. Repeat for each table and script you are exposing to this role.
In this example, we've not exposed API access to the Contact table itself but have allowed event scripts to run for API calls to the Contact table.