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

PR: RBAC Role Based Access Control #27 #31 #82 #85

Merged
merged 167 commits into from
Sep 17, 2020
Merged

PR: RBAC Role Based Access Control #27 #31 #82 #85

merged 167 commits into from
Sep 17, 2020

Conversation

nelsonic
Copy link
Member

@nelsonic nelsonic commented Jul 23, 2020

This PR is still very much Work In Progress.
So far I've added the

Also creating helper functions that can be used to check for roles/permissions in: https://github.com/dwyl/rbac

Please ignore this PR until I have a chance to add more detail.
My focus is on creating a minimal implementation that we can use for dwyl/smart-home-auth-server#1
but with a view to building a more versatile system that can be used for a variety of Apps.

@nelsonic nelsonic added the in-progress An issue or pull request that is being worked on by the assigned person label Jul 23, 2020
@nelsonic nelsonic self-assigned this Jul 23, 2020
@codecov
Copy link

codecov bot commented Jul 23, 2020

Codecov Report

Merging #85 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            master       #85    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           10        21    +11     
  Lines          233       424   +191     
==========================================
+ Hits           233       424   +191     
Impacted Files Coverage Δ
lib/auth/login_log.ex 100.00% <ø> (ø)
lib/auth/apikey.ex 100.00% <100.00%> (ø)
lib/auth/app.ex 100.00% <100.00%> (ø)
lib/auth/people_roles.ex 100.00% <100.00%> (ø)
lib/auth/permission.ex 100.00% <100.00%> (ø)
lib/auth/person.ex 100.00% <100.00%> (ø)
lib/auth/role.ex 100.00% <100.00%> (ø)
lib/auth/status.ex 100.00% <100.00%> (ø)
lib/auth_web/controllers/app_controller.ex 100.00% <100.00%> (ø)
lib/auth_web/controllers/auth_controller.ex 100.00% <100.00%> (ø)
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fafc5e0...23df807. Read the comment docs.

@nelsonic nelsonic mentioned this pull request Jul 23, 2020
3 tasks
lib/auth/app.ex Outdated Show resolved Hide resolved
@sourcelevel-bot
Copy link

SourceLevel has finished reviewing this Pull Request and has found:

  • 20 fixed issues! 🎉

See more details about this review.

@nelsonic
Copy link
Member Author

Hi @th0mas, I think I've addressed the issue you noted in #116 (potential sec issue in role CRUD).

There are still many more enhancements/refactors that can be applied to auth but I really want to avoid this PR dragging on forever; I'd much rather create new issues for features/enhancements so that we can get this PR merged and then create subsequent (much) smaller / more focussed PRs.

Please take a look at this PR as part of your integration work.

The only feature I think you might want/need almost immediately is granting roles in any app #119 💡
But again, I think this could be added in less than an hour in a follow-up PR. 💭

@th0mas
Copy link
Collaborator

th0mas commented Sep 17, 2020

Yeah I think it would be best to merge this to master now and add any extra features as extra PRs.

Now #116 is fixed i'm happy to merge this.

@th0mas th0mas merged commit 5de6261 into master Sep 17, 2020
@nelsonic
Copy link
Member Author

@th0mas thanks for reviewing/merging. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review An issue or pull request that needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants