-
Notifications
You must be signed in to change notification settings - Fork 334
Description
[X]: This is a bug and not a question.
[X]: I understand that the best way to resolve this issue is to solve it and propose a Pull Request.
Describe the bug**
We have multiple schedules with multiple resources in each.
We manually set permissions for users which resource they are allowed to book.
When I set the permissions via the "Application Management" > "Users" interface via the dropdowns of the resources and the update it, the result is inconsistent.
I have a user account in the Admin group, I am the acting SysAdmin of the system, so I should be able to change anything.
Running SELECT * FROM user_resource_permissions WHERE user_id = 123; I can see not all permissions that I selected were set.
Sometimes all, sometimes only one, sometimes I had 3 set, and adding a new deletes the old ones and just adds the new one.
Sometimes one even sees the permission is set in the database, but bringing up the permissions in the "Application Management" > "Users" interface does not show any set permissions.
I have not found a pattern to it.
Setting the permissions at the resources directly for the relevant user(s) works. But then one cannot touch the permissions in the user menu any more for fear of accidentally deleting the already set permissions from the resources.
To Reproduce**
- Go to "Application Management" > "Users"
- Select any User
- Set new permissions for an additional resource
- Run
SELECT * FROM user_resource_permissions WHERE user_id = 123;to see which permissions have been set. - Reload site, check if permissions actually show up.
- Set new permissions for additional resources
- Run
SELECT * FROM user_resource_permissions WHERE user_id = 123;again to see which permissions have been changed. - Reload site, check if permissions actually show up.
Expected behavior**
Changing permissions should not interfere with existing permissions.
Displaying permissions should show what permissions are set in the database.
Screenshots**
Specifications
- LibreBooking version 4.0