Skip to content
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

Add Admin UI (#30) #54

Merged
merged 3 commits into from
Sep 24, 2020
Merged

Add Admin UI (#30) #54

merged 3 commits into from
Sep 24, 2020

Conversation

jasalisbury
Copy link
Contributor

@jasalisbury jasalisbury commented Sep 24, 2020

Description of change

The admin UI allows setting of user info and permissions. The user info is the user's name, email, job title and their region. Permissions are modeled to be flexible. A user permission is made up of a region and a scope. A scope represents the ability to do something specific, like READ_REPORTS. Combined with the region the permission system should be flexible enough to handle user's that need permissions that cross regions.

This is not the final version of the admin UI, although I feel like the UI itself won't be updated much. I expect the schema of the data that drives the admin UI will be updated and will require the UI to be updated as well. But I feel this is a good base for those changes to be applied when needed once the permission model has been finalized, and when we have a more definitive list of scopes.

Out of scope:

How to test

  1. yarn deps (yarn docker:deps)
  2. yarn start:local (yarn docker:start)
  3. Browse to localhost:3000/admin

Issue(s)

Checklist

  • Meets issue criteria
  • Code tested
  • Meets accessibility standards (WCAG 2.1 Levels A, AA)
  • [n/a] Documentation updated

* Add Admin UI

The admin UI allows setting of user info and permissions. The user info
is the user's name, email, job title and their region. Permissions are
modeled to be flexible. A user permission is made up of a region and a
scope. A scope represents the ability to do something specific, like
READ_REPORTS. Combined with the region the permission system should be
flexible enough to handle user's that need permissions that cross
regions.

Not yet done:
 * Any API work, including saving/modeling/REST endpoints
 * Checking/usage of permissions/user info in any other part of the
   TTAHUB

* Add title to admin page

* Change first/lastname field to full name

* Set Harry's region to 1

This is to closer match the current permissions for the user

* Add comment about region 0
Bumps [bl](https://github.com/rvagg/bl) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/rvagg/bl/releases)
- [Commits](rvagg/bl@v4.0.2...v4.0.3)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Copy link
Contributor

@rahearn rahearn left a comment

Choose a reason for hiding this comment

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

No code changes needed, but I want to ask about the regions thing to inform #50 and #52

frontend/src/components/__tests__/RegionDropdown.js Outdated Show resolved Hide resolved
frontend/src/pages/Admin/UserInfo.js Outdated Show resolved Hide resolved
frontend/src/pages/Admin/components/CurrentPermissions.js Outdated Show resolved Hide resolved
@rahearn
Copy link
Contributor

rahearn commented Sep 24, 2020

This will be ready to merge once adhocteam#34 is merged in.

* Region dropdown shows central office. Remove unnecessary key prop

* Add missing semicolon

* Use "co" as the central office region. 13 is already sometimes used
@rahearn rahearn merged commit 9a9e79c into HHS:main Sep 24, 2020
rahearn pushed a commit that referenced this pull request Oct 27, 2020
Co-authored-by: Sarah-Jaine Szekeresh <[email protected]>
Co-authored-by: kryswisnaskas <[email protected]>
rahearn added a commit that referenced this pull request Oct 27, 2020
CI: Use one image for dynamic security scan (#54)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spike: Admin tool for managing roles and permissions
2 participants