Skip to content

Setting user_resouce_permissions from the Application Management > User interface is inconsistent #990

@JensWendt

Description

@JensWendt

[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**

  1. Go to "Application Management" > "Users"
  2. Select any User
  3. Set new permissions for an additional resource
  4. Run SELECT * FROM user_resource_permissions WHERE user_id = 123; to see which permissions have been set.
  5. Reload site, check if permissions actually show up.
  6. Set new permissions for additional resources
  7. Run SELECT * FROM user_resource_permissions WHERE user_id = 123; again to see which permissions have been changed.
  8. 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**

Image

Specifications

  • LibreBooking version 4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions