Shelf-nu / shelf.nu

shelf is open source Asset Management Infrastructure for absolutely everyone.
https://shelf.nu
GNU Affero General Public License v3.0
1.81k stars 168 forks source link

Purpose of Admin account and how to use it ? #1371

Open sochartetu opened 3 days ago

sochartetu commented 3 days ago

Contact Details

No response

What happened?

So, there are several env. variables about admin account. It's only stated that it is the email used to get in touch with an admin when a trouble happens on the website. But, somewhere else in the doc, it's mentionned we are supposed to login with the admin creds. But, of course, it does not work and I get an error that the account does not exist.

So, what is the purpose of all those variables if it's only used as a contact ? How am I supposed to login with the creds related to this account ?

What is the expected behaviour?

Being able to use the account

Version

Self-hosted

What browsers are you seeing the problem on?

Firefox

Relevant log output

No response

DonKoko commented 12 hours ago

Hey @sochartetu .

So, there are several env. variables about admin account. It's only stated that it is the email used to get in touch with an admin when a trouble happens on the website. But, somewhere else in the doc, it's mentionned we are supposed to login with the admin creds. But, of course, it does not work and I get an error that the account does not exist.

I am not sure which variable you are referring to but the only one mentioning admin in .env.example is this one:

# Used for sending emails to admins for stuff like Request user delete. Optional. Defaults to support@shelf.nu
ADMIN_EMAIL="support@shelf.nu"

This is meant for when a user wants to be deleted, they can send a request to the super admin of shelf. As for your second question, to make a user be a super admin you need to manually add an entry in RoleToUser for the user who you want to be super admin. If you feel like there are any mistakes in the documentation or anything not clear, feel free to open an issue & PR which clearly explains the problem with the docs and what your suggestions.

So, what is the purpose of all those variables if it's only used as a contact ?

Let me know which other variables you are referring to. The purpose of the ADMIN_EMAIL is to change who those requests are sent to. If you are self hosting shelf, i can assume you dont want delete requests to go to support@shelf.nu

sochartetu commented 10 hours ago

From your documentation, I am not dreaming. So, again, what is the purpose of ADMIN_USERNAME and ADMIN_PASSWORD ? image