-
Notifications
You must be signed in to change notification settings - Fork 3
Add basic multiple admin users #1
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
base: master
Are you sure you want to change the base?
Conversation
Just a general suggestion:
To prevent this, please:
|
Hi @CommanderStorm, thanks for taking time giving me such interesting suggestion 👍🏼
That's a good reason to not merge it. My approach try to be far simpler so I guess it should avoid the first issue. And for the second one, I'm not that kind of people.
You are perfectly right, my proposal will only contains code related to basic multi admin account support, nothing else. If you are okay, once my code will be working, could you please take a first look and indicate me the "tests [that] makes sense" I should add? |
@CommanderStorm sorry to disturb you, I have a question about translations. I have a few translations to add, I currently add them in At the end, I dont know how to properly handle translations in my PR 🤷🏼♂️ |
Please only add the strings which are translatable to The translations can then (after merging a PR into master) be translated by our army of translators over at weblate
No worries, ping me as many times as you want ^^
What are you confused about (where do we need to update the docs?) |
This is awesome, you are so reactive! Thanks a lot!
😘
As I try to explain (sorry it was probably unclear), this section: https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#translations contains only one link which is broken (404): So I never found how to handle translations "properly", I mean in a way it's acceptable at PR review time. To be perfectly clear, the missing information is the one you gently provide:
I guess that information would be originally provided on the broken link page 🕳️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing that, I think, is worth commenting on despite you not being done with this PR:
Previously, the relationship between monitors/.. and users was that users “own” the monitors (despite us not having more than one user).
Now you are changing the relationship to not have these checks any more.
- Things which previously were namespaced to a user now are in a global scope.
- This makes some interactions impossible
- one user not seeing all the monitors
- one user granting another user access to some of their monitors.
I am fine with this change, but I am not the bdfl (Louis).
He will likely need a reason why all of these checks are removed.
No worries, your comments are more than welcome! 🤗
My approach is: we store in the DB the user id of the ressource creator (here monitors) which is a different concept of ressource owner. After my change, ressources are totally user independent. Without that, "multiple admin user" makes no sense. To be honest, I was very surprised to discover that "user relationship" since, until now, UK assume that only one user can exist... 🤷🏼♂️ IMHO, that user ownership implementation is nothing else over-engineering:
wdyt? |
My thoughts on this are kind of irrelevant. (as stated above: I am not the bdfl...) Only Louis vote really matters. I think that removing core-code without a good reason needs an explanation. Note that not having access rights management and user ownership is not an either or choice. Asking the community in louislam#128 might also be helpful:
TLDR: I think opening an PR and discussing the work plan now (or after further investigation) is a good idea. |
3a40a7c
to
dea4bab
Compare
Yes I know, but you clearly very well knows UK (at least faaaar better than me) and so, with your experience, you act as a first "filter" 🚔
Of course! The explanation is very simple however: following KISS philosophy. I'm trying to provide a very basic multiple admin users support. Since we are speaking about admin users only, they obviously have access to everything. That's why the current resources user-scoping can't be kept.
I kind of agree. But then there is more questions to solve, for example: what happens on user removal? Should we remove all associated resources in cascade? Probably not! So what to do? Transfer ownership to another user? Or perhaps implement user "soft delete" in DB (could be a So many questions... changes... for a so small benefit... at the end I think that the simplest solution is to make resources independent from users. But please keep in mind that my proposal is just a first step in the right direction. I really hope to see enhancements (like ACL and/or RBAC system) in the futur.
I carefully read that issue, the community request is very clear: they want multi users support with rights management (in a way or another). I'm afraid a so open discussion might takes a lot of time because of the huge amount of people waiting for that feature. Because of that, my plan is to start with the very basic approach you know, then,
As you know I have provide my WIP code ASAP because I'm always open to discussion and advise, especially as a new comer on a project 👶🏼 |
867e290
to
f306f5a
Compare
@CommanderStorm could you please take a look on my work? 🙏🏼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the previous two comments. I did mean to include them into this review, but I tried https://github.dev/ (can recomend) for reviewing PRs ^^.
This is a partial review of the code only.
I still need to do a design/UX/functionality-pass respectively.
I am going to the cinema tomorrow evening, so I will get to test this deeper on Wednesday or Thursday.
checkLogin
now should also check for the disabled state of a user- overall, the work quality is excellent. (no obvious defects from a code perspective, no obvious defects from a security perspective)
I don’t know if this will be possible but I have some features you could add
Is ok if I add more features to edit Very good feature, keep it up which to be implemented soon to Uptime Kuma |
Thanks for sharing your enthusiasm and glad to see it please you. |
@CommanderStorm Thanks A LOT for the time you spent reviewing my code. I just add a commit with some of your suggestions. I also reply to others comments with explanations.
But!? You are right! How I could even forgot about that! 🤦🏼♂️
WHAT! You are going to the cinema instead of gracefully reviewing my code!? This is a SCANDAL! 😏😂 NB: Some of my comments might be a bit opinionated, but don't worry: at the end, I will obviously follow this project guidelines 😘 |
2b2a352
to
fcc1fbc
Compare
# Conflicts: # src/lang/bg-BG.json # src/lang/de-CH.json # src/lang/de-DE.json # src/lang/fi.json # src/lang/fr-FR.json # src/lang/it-IT.json # src/lang/ja.json # src/lang/ko-KR.json # src/lang/nl-NL.json # src/lang/pl.json # src/lang/pt-BR.json # src/lang/ru-RU.json # src/lang/uk-UA.json # src/lang/zh-CN.json
Co-authored-by: Frank Elsinga <[email protected]>
Co-authored-by: Frank Elsinga <[email protected]>
Co-authored-by: Frank Elsinga <[email protected]>
…#5880) Co-authored-by: Ionys <[email protected]> Co-authored-by: Frank Elsinga <[email protected]>
Co-authored-by: Maksim Kachynski <[email protected]> Co-authored-by: Frank Elsinga <[email protected]>
…tication headers (louislam#5871) Co-authored-by: Frank Elsinga <[email protected]>
Co-authored-by: Frank Elsinga <[email protected]>
Co-authored-by: Frank Elsinga <[email protected]>
Co-authored-by: Frank Elsinga <[email protected]>
Sorry, my ESLint extension was disabled
Wasn't mine this time!
Users list:

Confirm modal on disabling user:

Add an admin account:

Edit an admin account:
