...
No schema changes unless the performance of updating non-moderated channel-scoped permissions on the higher-scoped schemes is problematic, in which case the schema of storing permissions can be changed from we can see if we can improve the update performance by changing how permissions are stored. Currently permissions are stored as a space-separated list of strings string in the Permissions
column of the Roles
table. We could test migrating them to a join table, something like this:
|
|
---|---|
|
|
|
|
After that change, adding and removing permissions form from roles may get faster because—although it would still need to be done once per role (ie i.e. 3x) per affected channel per affected permission—at least the string parsing could be eliminated per role and indexes could would be leveragedavailable.
REST API
A new endpoint to get the channel moderation matrix. For example, to display the matrix as shown in the configuration from the high-fidelity mockups, the API endpoint
GET /api/v4/channels/:channel_id/moderations
returns the following:
...