-
-
Notifications
You must be signed in to change notification settings - Fork 231
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]: v0.4.3: "Downloads" inaccessible when using LDAP authentication #591
Comments
This would suggest that you have become an view only user, see latest release notes for that. Validation expects your user to be in the admin group, to allow you to access all resources. @DanielBatteryStapler can you look into this? Do we need to update the docs? |
I suspected something along that lines, without realizing the full implications of what "read only user" actually meant. At the moment it seems the only way to get Superuser status with LDAP is to disable it, log in with a djago super user, edit the LDAP user to set Superuser status, and enable LDAP again. This is a bit cumbersome, but a workaround. So I guess this evolves more into a feature request to add additional LDAP filters to determine superuser/staff status and LDAP group <> TA group mapping. That would be awesome. :) |
Sorry for the delay, but I'm also not much help here. I've worked on adding LDAP support to other Django projects and I've always had some issues with trying to get user permissions to work properly. Sometimes(and I really do mean sometimes, I can't figure out why for some projects it refuses to work) it works okay based on LDAP groups, but there always seems to be something weird going on. Specifically, I have been unable to figure out how to give superuser status to LDAP users by default, or really any other specific user permission level. I've tried editing Django's User prototype but nothing I seem to do works. I agree it would be great to have more controls over how LDAP interacts with Django's permissions system to iron this all out, but believe me when I say I've tried everything I could think of and I couldn't get it to work -- though I will admit I not an expect in Python or Django so I'm sure for somebody else it's possible. @Salvoxia Your cumbersome work around is exactly what I have to do with on another project I helped add LDAP support to ArchiveBox/ArchiveBox#1214 . If anybody finds a fix for the LDAP-Django permissions on this project I'll port them over to ArchiveBox as well. I've just accepted having to do a whole rigmarole when setting up new users as the price I have to pay for LDAP accounts to work on Django, it's still worth it to me. |
The docs here gives example for https://github.com/django-auth-ldap/django-auth-ldap#example-configuration |
Adding temporary instructions until there is some way to make LDAP users that are not read-only users.
|
I've read the documentation
Operating System
Docker
Your Bug Report
Describe the bug
I'm running tubearchivist in Docker and use LDAP for authentication.
After upgrading to v0.4.3 I noticed the "Downloads" menu item in TA was missing.
When manually navigating to
https://tubearchivist.mydomain.com/downloads
I was redirected to the login page with the URLhttps://tubearchivist.mydomain.com/login/?next=/downloads/
. After logging in again I ended up in a login loop with the same URL.After disabling LDAP authentication, logging out and back in with the django credentials the "Downloads" menu item re-appeared and worked as expected.
Steps To Reproduce
https://tubearchivist.mydomain.com/login/?next=/downloads/
Expected behavior
"Downloads" is displayed and functioning also when using LDAP authentication
The Docker logfiles did not change from the point the container finished starting up until after reproducing the bug with
DJANGO_DEBUG=True
.Best Regards,
Salvoxia
Relevant log output
Anything else?
No response
The text was updated successfully, but these errors were encountered: