Unified user list#4281
Conversation
There was a problem hiding this comment.
I pulled this and had a play around with this and this is a massive step in the right direction. The search and filter options work really well and will help us eliminate numerous pages.
General comment:
As we discussed in the 18th June standup this page will benefit a lot from the introduction of HTMX. Perhaps the list of roles could be converted into labels (similar to active/inactive & staff/superuser) and have an HTMX rendered modal/form that would allow the user to select or unselect roles from a multi-select list rather than having to add/remove them one at a time.
Requested changes:
If we are to incorporate this into v1.7 I think we need to leave the current pages as they are and introduce this as a beta page.
- Remove deprecation warning (not sure if when out of debug this is ignored but locally it presents a Django page
- Remove
(old)labels - Remove link to Reviewer Interests
- Mark the new feature as new
ajrbyers
left a comment
There was a problem hiding this comment.
Thanks for those changes. This is looking great. I've added one request around the AccountRoleForm.
There was a problem hiding this comment.
thanks @joemull, I quite like this single view. As mentioned by @ajrbyers, this view would benefit from some added interactivity with HTMX, since we are loosing some dynamic behaviour we currently have in search (datatables) and role management (ajax). Hopefully one step back and two steps forward in that regard.
This is to support accurate filtering on models who have access to journal only via an intermediary model, like AccountRole, and you want to filter by multiple attributes on the intermediary model. See Django's documentation on spanning multi-valued relationships: https://docs.djangoproject.com/en/4.2/topics/db/queries/#spanning-multi-valued-relationships
This reverts commit 1ac4f2c.
5d933a2 to
e1be350
Compare
|
Thanks @mauromsl -- I've taken these comments on board. It now looks a little different: |
mauromsl
left a comment
There was a problem hiding this comment.
Awesome! love the new changes!




Main issue:
Issues addressed:
This introduces a unified list of accounts that people with different permissions can search and filter at both the journal and press levels.
Journal Users
Editors will see a new option at the top of the Roles section in the manager:

This list gives a bird's eye view of accounts and roles:

They can filter by role, such as reviewer:

They can filter by account activation status, to help authors or reviewers who are stuck:

They can add roles:

All Users
Staff members can see an expanded version of this view at the press level.
Filtering to show all the staff accounts:

Adding a role from the press level:

What a superuser can see:

Mobile design
Deprecations and further work
I was able to unify many of the existing features of the previous user lists, with these exceptions:
Reviewer interest management
@ajrbyers did some work on this recently. To keep this work, I've added a new item to the reviewer settings called "Reviewer Interests" that loads the old reviewer list.
In the future, I think we could expand on this work by creating a CBV view for user interests, with similar functionality to the new user+role list.
Cross-journal management of roles by editors
An affordance of the old Enrol Users list was the ability for an editor to search outside their journal to find people that should have a role in their journal, so they can add them. I could not implement that feature in this list without introducing a lot of confusion about privileges, press vs. journal level, and hard-coded URLs. We should probably reconsider the feature and determine the best way to offer it going forward.