BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.49k stars 1.95k forks source link

When I try to add an LDAP user as admin, the permissions do not save. #5089

Closed silvaguilherme closed 5 months ago

silvaguilherme commented 5 months ago

Attempted Debugging

Searched GitHub Issues

Describe the Scenario

When I try to add an LDAP user as admin, the permissions do not save. I change the .env (AUTH_METHOD=standard), then as admin. I add my LDAP user as admin and save the page. image image

But when the user connects the application he loses the permissions. image

In my tests, the user only loses permission when logging into the application. If I grant him permission, and he is logged in, he has admin permission until he logs out

Exact BookStack Version

v24.05.2

Log Content

No response

Hosting Environment

Oracle Linux

ssddanbrown commented 5 months ago

Hi @silvaguilherme, I'm guessing you have the following option and values set:

LDAP_USER_TO_GROUPS=true
LDAP_REMOVE_FROM_GROUPS=true

In which case I'd expect the user to lose their admin role upon login unless this was mapping to a group in the LDAP system. If you intend for role assignments to remain, and not be removed by the LDAP group sync handling, you should set LDAP_REMOVE_FROM_GROUPS to false.

silvaguilherme commented 5 months ago

It worked Thanks

ssddanbrown commented 5 months ago

Good to hear! Will therefore close this off.