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

Add ability to create admin accounts with all auth modules #1330

Open
maximelouet opened this issue Feb 20, 2024 · 2 comments
Open

Add ability to create admin accounts with all auth modules #1330

maximelouet opened this issue Feb 20, 2024 · 2 comments

Comments

@maximelouet
Copy link

First, thank you for developing and maintaining this tool!

I was digging into how sharry considers an account to be "admin", as it's not mentioned in the documentation. If I understand correctly, it is hardcoded at the account creation, and it's always set to true for fixed accounts, and always set to false for all other accounts (since #286).

It would be useful to be able to create admin accounts outside of the fixed auth module. For example, I'm using the oauth module, and it would be great if sharry could read a specific attribute from my OIDC provider (Keycloak) to decide whether the account is admin or not.

@eikek
Copy link
Owner

eikek commented Feb 20, 2024

You can have admin accounts when using internal accounts. So you could perhaps have one dedicated internal admin account additionally to the oauth accounts. Other modules can't really provide this flag, so they don't support it. For oauth you are right, of course. It could be configured to extract it from the passed data. A temporary solution might also to set the flag manually in the database - the assumption is that you don't need it often, perhaps just for one or two accounts.

@maximelouet
Copy link
Author

Ah right, yes I think I will go with an internal admin account, or edit the database directly, that works for me.

As you said, considering other auth modules, the ability to specify the admin property only seems to be relevant for oauth. It would be nice to read this from the Oauth response, but as we have workarounds, it's not blocking me. Thank you for your quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants