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 app_id to roles schema #108

Closed
4 tasks done
nelsonic opened this issue Sep 11, 2020 · 5 comments
Closed
4 tasks done

Add app_id to roles schema #108

nelsonic opened this issue Sep 11, 2020 · 5 comments
Assignees
Labels
enhancement New feature or enhancement of existing functionality T1h Time Estimate 1 Hour technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

nelsonic commented Sep 11, 2020

In order to make RBAC useful we need to be able to create roles for Apps.
And when a new person joins an App, they need to be assigned a role specific to that App.

Todo

  • Add app_id field to roles schema.
  • Request to /approles/:client_id should return the list of roles as JSON
    where :client_id is the first half of the AUTH_API_KEY (similar to how auth_plug handles auth).
  • List of Roles for an App should include both the app-specific roles
    and "default" roles created by seeds.exs Get List of Roles for App  #110
  • Add app_id to conn.assigns.person so that we know which app the person authenticated with. Related: https://github.com/dwyl/auth_plug/issues/24
@nelsonic nelsonic added enhancement New feature or enhancement of existing functionality T1h Time Estimate 1 Hour technical A technical issue that requires understanding of the code, infrastructure or dependencies labels Sep 11, 2020
@nelsonic nelsonic self-assigned this Sep 11, 2020
@nelsonic
Copy link
Member Author

At present the roles listing looks like this: http://localhost:4000/roles
image

Next: add app_id to the table. ⏳

@nelsonic
Copy link
Member Author

A non-admin can create a new role for their own App(s):
image

Person with superadmin role can create a role for any/all Apps:
image

Chrome does not allow me to take a screenshot of the whole screen with the select showing all the options so here is the separate screenshot showing all the apps:
image

@nelsonic
Copy link
Member Author

Roles as viewed by Admin: http://localhost:4000/roles (showing two custom roles)
image

@nelsonic
Copy link
Member Author

Marginally better layout: http://localhost:4000/roles/1/edit
image

@nelsonic
Copy link
Member Author

Added app_id to conn.assigns.person

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement of existing functionality T1h Time Estimate 1 Hour technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
None yet
Development

No branches or pull requests

1 participant