WIP
OVERVIEW
...
Code Block |
---|
PERMISSION_READ_SETTINGS PERMISSION_WRITE_SETTINGS PERMISSION_CREATE_USER_ACCESS_TOKEN PERMISSION_READ_USER_ACCESS_TOKEN PERMISSION_REVOKE_USER_ACCESS_TOKEN PERMISSION_EDIT_OTHER_USERS PERMISSION_GET_PUBLIC_LINK PERMISSION_LIST_USERS_WITHOUT_TEAM PERMISSION_MANAGE_JOBS PERMISSION_MANAGE_OAUTH PERMISSION_LIST_PUBLIC_TEAMS PERMISSION_LIST_PRIVATE_TEAMS PERMISSION_READ_SYSCONSOLE_USERMANAGEMENT PERMISSION_WRITE_SYSCONSOLE_USERMANAGEMENT PERMISSION_READ_SYSCONSOLE_USERMANAGEMENT_USERS PERMISSION_WRITE_SYSCONSOLE_USERMANAGEMENT_USERS PERMISSION_READ_SYSCONSOLE_USERMANAGEMENT_GROUPS PERMISSION_WRITE_SYSCONSOLE_USERMANAGEMENT_GROUPS PERMISSION_READ_SYSCONSOLE_USERMANAGEMENT_TEAMS PERMISSION_WRITE_SYSCONSOLE_USERMANAGEMENT_TEAMS PERMISSION_READ_SYSCONSOLE_USERMANAGEMENT_CHANNELS PERMISSION_WRITE_SYSCONSOLE_USERMANAGEMENT_CHANNELS PERMISSION_READ_SYSCONSOLE_USERMANAGEMENT_PERMISSIONS PERMISSION_WRITE_SYSCONSOLE_USERMANAGEMENT_PERMISSIONS PERMISSION_READ_SYSCONSOLE_AUTHENTICATION |
...
First, the user needs to be in a role that gives them access to the System Console from the chat-facing side (READ_SETTINGS
). Then, depending on the role, the user could can have read-only access to the sections (READ_*no no WRITE_SETTINGS
) or can have WRITE_SETTINGS
permission but with some exceptions (basically breaking the permissions inheritance from the parent section).
The rules are as follows:
if the current user's system role does not have
READ
orWRITE
permission on the resource, the section is hidden for the user. Example: User Manager does not havePERMISSION_READ_SYSCONSOLE_PLUGINS
orPERMISSION_WRITE_SYSCONSOLE_PLUGINS
so the Plugins section is hidden from view for a user in a User Manager roleif the current user's system role only has
READ
permission on the resource, the resource (section) is disabled. Example: User Manager hasPERMISSION_READ_SYSCONSOLE_AUTHENTICATION
so the Authentication section is disabled for a user.if the current user's system role has a
WRITE
permission on a subsection, then no matter if he hasREAD
orWRITE
permission on the parent section, the resulting permission on the subsection isWRITE
Example: User , basically, the WRITE on the subsection broke the permissions inheritance from the parent section.
Example: User Manager hasPERMISSION_WRITE_SYSCONSOLE_USERMANAGEMENT_USERS
on the Users sub-section but alsoPERMISSION_READ_SYSCONSOLE_USERMANAGEMENT
on the entire section, the resulting permission isWRITE
on the sub-section.
...
if the current user's system role has a
READ
permission on a subsection, then no matter if he hasREAD
orWRITE
permission on the parent section, the resulting permission on the subsection isREAD
, basically, theREAD
on the subsection broke the permissions inheritance from the parent section (if not, by default, the subsection would’ve had the permission of the parent section).
Access to a setting in the config.json
Similar to the System Console, a user will need to be in a role that has the global READ_SETTINGS
permission to fetch a setting and WRITE_SETTINGS
to patch/update a setting. Beyond that, if the user only has READ
access to a section setting, we are restricting update access to that setting. For example, since if User Manager has only would have PERMISSION_READ_SYSCONSOLE_AUTHENTICATION
only, the user in this role will not be able to update the config.json
fields mapped to the Authentication settings (see table above).
...
Most API calls that were previously gated by the MANAGE_SYSTEM
permission are now gated by the READ_*
permissions for the get()
calls and WRITE_*
permission for the create
, patch
and update
calls.
If we need to have more granular access to an API method that corresponds to the functionality of a sub-section in the System Console (like in the User Manager case), we will gate those calls on a case by case (a single panel functionality in the System Console section/subsection can map to one or more API methods calls), using the system and non-system-scoped permission already assigned to the SystemAdmin for these operations.
Permissions
See changes detailed above
Schema
No schema changes
REST API
The following API methods will have their gating functionality changes, as follows:
Performance
No performance degradation expected.
Plugins
CREDITS
Thanks to