-
Notifications
You must be signed in to change notification settings - Fork 39
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
change password and new user code #168
Conversation
Codecov Report
@@ Coverage Diff @@
## master #168 +/- ##
==========================================
- Coverage 97.54% 95.32% -2.23%
==========================================
Files 3 3
Lines 204 214 +10
==========================================
+ Hits 199 204 +5
- Misses 5 10 +5
Continue to review full report at Codecov.
|
One challenge we have at the moment is when creating a user, you can't set whether they're active / admin / superuser. In I added something to So we can stop certain users from performing certain actions on Another option is to modify the register endpoint so superusers can specify the admin / active / superuser values. There's kind of a mismatch at the moment - the register endpoint was intended for people self registering, but in the admin we're registering users on their behalf. It might be better to just create a custom endpoint for superusers to register new users. Sorry for the long comment - do you see what I'm saying? |
Good point. We can hide the |
@sinisaos Yes, that's also a problem. One solution is to not send back a value for a secret field when doing a PATCH request. Alternatively, there might just have to be some custom UI for listing / editing users, which incorporates a proper change password form. |
@dantownsend We could easily fix this by setting |
@dantownsend I changed my approach to this. I will completely remove the |
@sinisaos Thanks. I agree - I don't think we can use the register endpoint. Either we use PiccoloCRUD somehow, or build a new endpoint for this specific purpose. |
This pull request introduces 1 alert when merging 48c22fa into 2fbdec3 - view on LGTM.com new alerts:
|
@dantownsend When you have time, create a patch for the local Piccolo API with the code from this PR, and then you can try new changes in Piccolo Admin. Hopefully this is better than the previous |
@sinisaos I've added validators to show you what I'm talking about. At the moment, the validators are pretty aggressive - they prevent non superusers from adding/editing/deleting. |
@dantownsend This is great and work with latest Piccolo API PR. |
Ability to change password and create a new user.