Skip to content

Resolve "Realtime event when PermissionsObject changes"

Merge Request Checklist

  • changelog.md has been updated if required
  • New/updated Premium features are separated correctly in the premium folder
  • The latest Chrome and Firefox have been used to test any new frontend features
  • Documentation has been updated
  • Quality Standards are met
  • Performance: tables are still fast with 100k+ rows, 100+ field tables
  • The redoc API pages have been updated for any REST API changes
  • Our custom API docs are updated for changes to endpoints accessed via api tokens
  • The UI/UX has been updated following UI Style Guide

Reasoning

When is the PermissionsObject updated?

  • User/Team Role assignment created
  • User/Team Role assignment updated
  • User/Team Role assignment deleted
  • User.permissions updated
  • Team trashed
  • Team restored

Who is affected?

Any user related to the Subject

How do we know if their permissions actually changed?

We don't, we will need to word the notification in a way that indicates that their permissions might have changed.

How to test

  1. Create 2 users
  2. Invite both users to the same group
  3. Log into both users in 2 different browsers for example
  4. Lower the role of one of the users on any scope
  5. Check that the user got a notification to refresh their page

You can repeat the above fro all the different scenarios listed in When is the PermissionsObject updated?.

TODO

  • Make sure the message is only sent when enterprise is enabled
  • Take group into consideration when deciding to show the notification
  • Make sure that permission objects are reloaded when switching groups
  • Add tests

Closes #1312 (closed)

Edited by Alexander Haller

Merge request reports