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

"Enable Authorization by Plugin: false" should be able to create users with no permissions #147

Open
mardom1 opened this issue Sep 26, 2023 · 4 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@mardom1
Copy link

mardom1 commented Sep 26, 2023

Describe the bug
Even though both "Enable Authorization by Plugin" and "Enable All Folders" are disabled, a new user is created with access to all libraries. The help text below "Enable Authorization by Plugin" states however, that "If false, the user will start with no permissions and an administrator will add permissions".

When I enable "Enable Authorization by Plugin" and leave "Enable All Folders" disabled, the new user has no permissions as expected. After giving access to a library, and logging out and back in, the library access is gone again, even though the help text says "The permissions of existing users will not be rewritten on subsequent logins".

To Reproduce
Issue:

  1. Disable both options in the plugin settings.
  2. Login with SSO (new user)
  3. New user gets created with access to all libraries

Issue 2:

  1. Enable "Enable Authorization by Plugin", disable "Enable All Folders"
  2. Login with SSO (new user)
  3. See that new user has no permissions
  4. Give user permission to a library
  5. Refresh and see that user now has permissions
  6. Logout and sign-in again using SSO
  7. User has no permissions again

Expected behavior
Behavior according to help text. No permissions when both option are disabled. When "Enable Authorization by Plugin" is enabled, do not overwrite permissions after each login.

Screenshots
Not needed.

Configuration
According to description.

Versions (please complete the following information):

  • OS: Linux
  • Browser: chrome
  • Jellyfin Version: 10.8.10
  • Plugin Version: 3.5.2.0
@mardom1 mardom1 added the bug Something isn't working label Sep 26, 2023
@9p4
Copy link
Owner

9p4 commented Sep 27, 2023

I think that the docs are unclear. The permissions will always be overridden on login (this is intended) if "Enable Authorization by Plugin" is enabled. If it is disabled, it will not modify any permissions for any user, and instead use the Jellyfin defaults (all access all the time).

Thank you for bringing the documentation issue to light.

@9p4 9p4 added documentation Improvements or additions to documentation and removed bug Something isn't working labels Sep 27, 2023
@mardom1
Copy link
Author

mardom1 commented Sep 27, 2023

Ah, ok. That makes sense if permissions are given through SSO.

Would it be possible to add an option to auto-create users without any permissions, but still keep access management in Jellyfin? Nothing important, though.

@9p4 9p4 added the enhancement New feature or request label Sep 27, 2023
@9p4 9p4 changed the title Wrong permissions for auto-created users "Enable Authorization by Plugin: false" should be able to create users with no permissions Sep 27, 2023
@9p4
Copy link
Owner

9p4 commented Sep 27, 2023

Related: #111

@brilthor
Copy link

This is a pretty big deal for attaching to google for auth, unless I'm missing something if you setup google for auth anyone with a google account can then login and will default have access to all the media.

I know with gitlab users get created when they login but are disabled until an admin enables them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants