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 support for multiple users #15

Closed
wants to merge 1 commit into from
Closed

Conversation

luclu7
Copy link
Contributor

@luclu7 luclu7 commented Jan 18, 2024

This PR adds support for multiple users. There's no permissions tho, everyone is admin, it's mostly to avoid having to share a single password with multiple people (our use case at @anjaraeu).

The current user's name is shown at the top right of the screen, near the new "user manager" button.
2024-01-18_15-53-02

The user manager is pretty simple
image

I've added a few tests and modified all the others auth tests, they all pass (thankfully).

update openapi.yaml

correct imports (a space after {)

multiusers: api: two less spaces

multiusers: change "Login" to "Username" for i18n

ButtonGeneric: not-allowed when disabled

multiusers: ajout traduction fr

usermanager: remove debug console.log

multiusers: better way to show the current user's login in the header

auth.ts: throw an error when a user already exists

auth.ts: remove a few debug prints

auth.test.ts: add a few tests for multiusers

auth.ts: check if a user already exists before adding it

auth.ts: eslint corrections (let to const)

multiusers: fix initDatabase (do not create an empty user)

multiusers: documentation

routerAuth: fix /bearer

multiusers: add/delete support

multiusers: first support

Add support for multi-user authentification

Header: add the current user's login
@dhenry123
Copy link
Owner

dhenry123 commented Jan 18, 2024

Hi, that's great, and for your case it works well?
In another case, I was thinking of adding a "read-only" call system, particularly for calls from the CI/CD chain.
My CI/CD chain calls the API with the admin token, and I don't like having a token with too many powers lying around in the infrastructure.
I'm testing your proposal this weekend...
Thank you for your interest for UtDon

@dhenry123
Copy link
Owner

WIP Don't touch this branch

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

Successfully merging this pull request may close these issues.

2 participants