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 basic user management #503

Merged
merged 4 commits into from
Aug 29, 2024
Merged

Conversation

dwradcliffe
Copy link
Contributor

@dwradcliffe dwradcliffe commented Aug 15, 2024

This adds:

  • role on User (can be admin or user right now)
  • backend/frontend to list users (only visible to admins)
  • backend/frontend to create a new user (only visible to admins)

Part of #57

frontend/src/index.html Outdated Show resolved Hide resolved
frontend/angular.json Outdated Show resolved Hide resolved
backend/pkg/models/user.go Outdated Show resolved Hide resolved
Copy link
Member

@AnalogJ AnalogJ left a comment

Choose a reason for hiding this comment

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

great first draft!

I made some nits, but overall I like the direction you're taking this 👍
However I think we might want to define a couple of explicit scenarios that we want to support.

Here's one (complex) scenario I'm thinking about:

  • a family consisting of 2 parents, and 2 children and a caregiver (nurse, babysitter, grandparent).
  • both parents need to be able to access both children's records, and maybe each-others
  • the caregiver should have view-only access to 1 or both children, but not the parents.

Given my understanding of the current admin role, the parents and caregivers would all need Admin access, and would be able to see every ones records.


though, now that I'm thinking about this, you probably plan to add access control as a separate PR, since we mentioned a dedicated lookup table in our conversations on Discord. Since this is just for user management (and alleviating concerns that unknown users are creating accounts on the server), I think this is fine.

Before you begin the access control PR, we should definitely define the scenarios we want to support (and the ones we dont).

@dwradcliffe dwradcliffe force-pushed the user_roles branch 2 times, most recently from a2e224e to 8eb613b Compare August 27, 2024 21:46
@dwradcliffe dwradcliffe marked this pull request as ready for review August 28, 2024 00:18
README.md Show resolved Hide resolved
@AnalogJ AnalogJ merged commit 4a82064 into fastenhealth:main Aug 29, 2024
4 checks passed
@dwradcliffe dwradcliffe deleted the user_roles branch August 30, 2024 02:34
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.

2 participants