Repository navigation
feat: User management with admin user - #11
Conversation
|
As a general rule, I do not like when a single PR contains independent changes. Like in this case, a new feature is bundled together with format changes like changing single quotes to double quotes. Do not change that in this PR, as it will make more confusing. |
lvarin
left a comment
There was a problem hiding this comment.
Most requested changes are not so important. Mostly coding style. We do not have a way to test this properly without Pubgrade being deployed in The Chzek or Greek cluster.
The biggest complain I have is that all the single quotes to double quotes, the separate the parameters in lines, ... Must have been done in another PR. It is not nce for the reviewers to scroll through thousand of irrelevant changes to find the relevant change. If this PR was split in two, the review would have taken much much less time.
It looks good overall.
|
Why did you squash the commits into one? That makes it harder to follow the changes. You better squash the commits after the review is done. |
|
Ok I'll take care now, won't squash new commits. |
|
Yes, for now, admin can't delete any user. Do I implement that as well, won't take much time if needed? |
* Added more customizable PVCs * Configurable PV size
That would be useful foe the admins, initially mostly for testing. If it is simple, please do :) |
Sure |
|
@lvarin I've fixed all the requested changes. Can you please re-review? |
|
I see you are still doing minor format changes in each commit. I would rather prefer this changes are doing in a separate PR, after we approve this one. Also I saw few of your comments, and they are descriptions of the code (which is useless), but not explanation of what do you want to accomplish. Instead of saying "Try to evaluate python expression and if any exception occurs, use Why the first eval can fail and not the second? What are some valid values of id_charset? What is the variable configuring? I can see that set removes duplicates, sorted sorts them alphabetically and join makes a string out of it, but WHY? |
| user_object = {} | ||
|
|
||
| try: | ||
| user_object["name"] = data["name"] |
There was a problem hiding this comment.
StackOverflow gave me something like:
''.join(e for e in string if e.isalnum() or e.isspace())
It is simple, but already cleans up the input
| Sanitised text | ||
|
|
||
| """ | ||
| return re.sub('[\W_]+', '', text) No newline at end of file |
There was a problem hiding this comment.
Almost there but now:
>>> string='Al;varo Gonzalez'
>>> re.sub('[\W_]+', '', string)
'AlvaroGonzalez'
Spaces are also deleted.
There was a problem hiding this comment.
Works for me:
>>> string='Alvaro; Go/;][-=nzalez'
>>> ''.join(e for e in string if e.isalnum() or e.isspace())
'Alvaro \tGonzalez'
spaces are not deleted
There was a problem hiding this comment.
Yes it's working, by mistake I tried with old function.
|
@uniqueg Do you want to review this as well? For me it looks fine and ready to merge |
Added user management with user verification by admin users.
config.yamlcontains a list of admin users who have the privilege to verify administrator user accounts. Also, administrators can use/users/registerto create a new account (by default unverified).