Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a permission to role does not automatically sync the newly accessible records #2300

Closed
sleidig opened this issue Mar 15, 2024 · 2 comments

Comments

@sleidig
Copy link
Member

sleidig commented Mar 15, 2024

Gaining permissions may require a "Reset Application" to clear the db and restart sync to get all data.

To Reproduce
Steps to reproduce the behavior:

  1. Set a user with restrictive permissions (e.g. only access School not Child entities)
  2. Sync and see the limited access in app (the Child menu item also disappears)
  3. Add permissions to Child entity type to the role
  4. Reload app and see the "Children" menu item appear
  5. The children list is empty (!); only after resetting the db are the children synced.

Do we need to manually trigger this in the API? (--> test if that helps)
And if so, can we integrate that to auto-trigger in the API when Config:Permissions is changed?

@github-project-automation github-project-automation bot moved this to Triage / Analysis in All Tasks & Issues Mar 15, 2024
@sleidig sleidig moved this from Triage / Analysis to Todo (ready for work) in All Tasks & Issues Mar 19, 2024
@sleidig
Copy link
Member Author

sleidig commented Mar 19, 2024

Config changes that grant new permissions require a manual db/admin/clear_local/{db} call. Use the Swagger UI for this: https://dev.aam-digital.net/db/api#/default/AdminController_clearLocal

However, it may be good to always trigger this upon permission doc changes?

@sleidig
Copy link
Member Author

sleidig commented Mar 19, 2024

@sleidig sleidig moved this from Todo (ready for work) to In Review in All Tasks & Issues Mar 19, 2024
@sleidig sleidig closed this as completed Mar 19, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in All Tasks & Issues Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant