Issue 2352 Additional filters for super-admin user index - #2508
Merged
Conversation
Contributor
|
think this one should be a PR to development (it looks like it was based off of that branch). |
briri
requested changes
May 13, 2020
briri
left a comment
Contributor
There was a problem hiding this comment.
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
| 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) |
briri
approved these changes
May 13, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.