Admin view
Admin view redesign including mobile usability;
The optional method param must end with a question mark. There must only be one get and one post application definition for the same endpoint.
app.get(`${process.env.DIR||''}/api/user/:method?`, api)
app.post(`${process.env.DIR||''}/api/user/:method?`, express.json({limit: '5mb'}), api)
The update method will now receive a req.body. I changed the put to update in the user view script.
The user add method should be extended to also check for a req.body.
The checks for the params.user must be first. The params user is the admin user.
Various list of changes from me / Admins here :)
They were big fans of the changes so well done @cityremade ! 🥳
Main View
- Capitalise Email in the table header
- Below Show blocked accounts checkbox add text saying 'Click on an email in the table to make changes to the users permissions and roles'
- Make New Orange instead of red
- Make Awaiting Verification red - as it requires fixing
Form
- Capitalise Email
- Update tooltips on checkboxes - should all start 'Check the box to verify a user' 'Check the box to re-verify after password reset' 'Check the box to approve a user' 'Check the box to make user an administrator' 'Check the box to allow the user API privileges' 'Check the box to block the user'
- Option to pass in text about what User Roles are (perhaps an eye that expands).
- 'Account Expiry' instead of 'Account expires on'
Looks really good @cityremade! 👏
One thought I had...should we make the Status column sortable (by clicking on the column header) or filterable so it's easier for the user to find all of the accounts which require action?
In order to use role description add roles object in the workspace:
"roles": { "this role": { "label": "This is a label that explains what this role does" } }
The
user/putanduser/addmodules should be merged as they do the same.
create and update should be separate. I'd rather merge put + update;
Can we add the ability to sort by the columns in the table?
Clicking on them does nothing
nope. Sorting was deliberately removed - now search filters are in place.
Can we add the ability to sort by the columns in the table? Clicking on them does nothing
nope. Sorting was deliberately removed - now search filters are in place.
Why were they removed?
Can we add the ability to sort by the columns in the table? Clicking on them does nothing
nope. Sorting was deliberately removed - now search filters are in place.
Why were they removed?
I also asked for this. I use this all the time in the current console to sort by when people have last logged in...
Looking good - thanks for all those changes!
I'm getting error on save error: column "re_verification" of relation "users" does not exist as i think it should be looking at the verified column when you re_verification?
Also i noticed on mobile the dialog text doesn't wrap so it gets lost off the page (see the word reset!)
Me thinks this is using an ACL table that is missing a column? It would have been part of #1264
Me thinks this is using an ACL table that is missing a column? It would have been part of #1264
Not the case - in #1264 it had a conditional on the field before storing to the db. We need to put this back in as its uses the verified field on the db -there is no reverfication_field.
We don't want to do these tests on private ACL's but on public ones. @cityremade Can you redeploy using the ACL on our neon instance?
Me thinks this is using an ACL table that is missing a column? It would have been part of #1264
Not the case - in #1264 it had a conditional on the field before storing to the db. We need to put this back in as its uses the verified field on the db -there is no reverfication_field.
Nice pick up! :)
Quality Gate passed
Issues
22 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
so here it is, the pr containing only backend + pills changes that are needed for the new admin view to work https://github.com/GEOLYTIX/xyz/pull/1392
The new admin view template is now in public/mapp/admin_view.html I am keeping this pr in draft as I am still using it to redeploy the test app.
Closing as the task has been split into 2 separate changes. This branch is no longer needed.
