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

[BUG] - Administrator flag for LDAP user can't be saved #2554

Closed
5 of 6 tasks
Smile1975 opened this issue Sep 17, 2023 · 4 comments · Fixed by #2583
Closed
5 of 6 tasks

[BUG] - Administrator flag for LDAP user can't be saved #2554

Smile1975 opened this issue Sep 17, 2023 · 4 comments · Fixed by #2583
Labels
bug Something isn't working triage

Comments

@Smile1975
Copy link

First Check

  • This is not a feature request
  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/)

What is the issue you are experiencing?

I'm using LDAP authentification. When switching my user from mealie authentification to ldap authentification, then activating the administrator flag, saving the settings and log of, after login with this LDAP user the user has no admin rights.
When I log off the LDAP user and logging in with an administrativ user with mealie authentification and looking for the LDAP User I have activated the admin flag, the flag is no longer ativated.
This can be reproduced. It is not possible to activate to administrator flag for an user with LDAP authentification.

Steps to Reproduce

  1. Set LDAP Settings in Docker-Compose.yml
  2. Logging in with a LDAP user
  3. Log off
  4. Log in with a administrativ user with mealie authentification
  5. Go to Users and select the LDAP user.
  6. Set the administrator flag and save this setting.
  7. Log off
  8. Log on with LDAP User
  9. Go to users an open the LDAP user. The administrator flag ist deactivated.

Please provide relevent logs

Details
Version: nightly
Build: 0a00a6e
Anwendungsmodus: Produktivumgebung
Demostatus: Keine Demo
API-Port: 9000
API Dokumentation: Aktiviert
Datenbanktyp: sqlite
Rezept Scraper Version: 14.42.0

Checks
Sichere Website: Yes
Serverseitige Basis-URL: Yes
LDAP bereit: Yes
Email Configured: Yes
Docker Volumes: success

Mealie Version

nightly
Build: 0a00a6e

Deployment

Docker (Linux)

Additional Deployment Details

No response

@Smile1975 Smile1975 added bug Something isn't working triage labels Sep 17, 2023
@cmintey
Copy link
Contributor

cmintey commented Sep 17, 2023

This is intended behavior. Every time a user logs in with LDAP, mealie checks in to see if they have an admin group in the LDAP server. If they are not, then they are not admins.

You can create a "mealie_admin" group in your LDAP server and add an LDAP_ADMIN_FILTER to mealie, and mealie will pick up the changes. See the configuration for LDAP here: https://nightly.mealie.io/documentation/getting-started/installation/backend-config/

@Smile1975
Copy link
Author

Thank you, with the extra admin group in my domain and the modified ldap-admin-filter it works. I thought that it also will be possible to set an mealie admin flag manually to a ldap user.

@michael-genson
Copy link
Collaborator

It might be worth it to disable that field if a user is an LDAP user (i.e. make it read only). But I don't use LDAP so I'm not sure if that would cause issues or not

@cmintey
Copy link
Contributor

cmintey commented Sep 17, 2023

Yeah that would probably be helpful. Should be pretty straightforward to implement. I'll try to work on that if I get the time unless someone else wants to pick it up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants