Assisted Web Role Management
Web roles are assigned to portal users through Dynamics.
Feature Overview
Web roles are assigned to portal users through Dynamics. There is a M:M relationship between contact and Web role, and so a portal contact can have multiple web roles. The least restrictive permissions of the combined roles will be the final permission granted to the end user.
In order to facilitate easy allocation of web roles to users, a single line text field has been added to the contact entity itself. When the "klevr_quickassignwebrole" field is updated with a comma separated list of web role names, a plugin will automatically allocate the roles to the user. If a matching role is not found, it will simply skip it. It is important to note that the field is not kept in sync with the web roles allocated, and is simply used to allocate additional roles. It therefore does not remove roles either.
Assumptions
- You have the latest version of the Klevr Forms Dynamics solutions installed.
Dependencies
There are no dependencies.
Design Details
The design is to have a field on contact which can easily be updated using a business rule or similar process to allocate a web role to a portal user. The field itself should not be exposed on the portal or enabled in the portal client side API, as this will allow users to elevate their own privileges, or even other users priveleges depending on their access to other contact records.
It is also only one way, and will only do additional roles, meaning that whether the value of the quick assign web role field is set or cleared, it will only allocate new web roles found in the value of this field, and will not remove of clear the existing allocated web roles.
See https://dev.azure.com/klevr/Klevr%20Apps/_workitems/edit/3117 for more details.
Security Considerations
- Do not expose this field directly on the portal or in the portal API configuration, as this will allow users to elevate their own permissions through javascript injection in the browser debugger.
- Ensure your processes for allocating web roles are secure.
Open Questions
- Do we need to cater for removal of web roles?
🚫 Out of Scope
- Creating new web roles. If a value in the comma separated list is not found to match an existing web role, it is ignored and skipped.
Last updated on