Skip to content

Issue 2352 Additional filters for super-admin user index - #2508

Merged
briri merged 2 commits into
developmentfrom
issue_2352
May 13, 2020
Merged

Issue 2352 Additional filters for super-admin user index#2508
briri merged 2 commits into
developmentfrom
issue_2352

Conversation

@martaribeiro

Copy link
Copy Markdown
Member

Fixes #2352

Changes proposed in this PR:
To add an organisational-filter, along with a filter for permissions (to easily see all org/super-admin users on your instance)

A solution to this problem was to allow users to search by organisation and by adding a check box that filters users with permissions. For example, a “super-admin’ can search for an UoE user with the ability to “add organisations”, “modify templates” and “modify guidance”. The way the filter by permissions work is by looking for users with one or more types of permissions.

There was a javascript validation to only submit the search for when there was search text. This was stopping the permissions filter to submit. The decision to remove this validation was not only to allow the filter to work but as well to allow the user to clear the search box in order to clear the search results.

@briri

briri commented May 13, 2020

Copy link
Copy Markdown
Contributor

think this one should be a PR to development (it looks like it was based off of that branch).

@martaribeiro
martaribeiro changed the base branch from master to development May 13, 2020 16:25

@briri briri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good @martaribeiro. You just need to remove that import { isValidText } from './isValidInputType'; line at the top of the paginable.js file since you removed the line that was calling that function

Comment thread app/models/user.rb
joins(:org)
.where("lower(firstname || ' ' || surname) LIKE lower(:search_pattern)
OR lower(email) LIKE lower(:search_pattern)
OR lower(orgs.name) LIKE lower (:search_pattern)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this

@briri
briri merged commit b35192f into development May 13, 2020
@briri
briri deleted the issue_2352 branch May 13, 2020 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants