Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

#26: Integrate RBAC #27

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft

#26: Integrate RBAC #27

wants to merge 19 commits into from

Conversation

th0mas
Copy link
Collaborator

@th0mas th0mas commented Sep 17, 2020

Integrate RBAC into smart home.

TODO:

  • Get roles list on user logon
  • Add role migration to DB
  • Add role-door relation
  • Add a GUI to add roles to doors
  • Adapt existing check/1 to use roles - Blocked
  • Eliminate dead code from old auth method
  • Authenticate views using new RBAC
  • Write tests for RBAC integration

@th0mas th0mas self-assigned this Sep 17, 2020
@th0mas th0mas linked an issue Sep 17, 2020 that may be closed by this pull request
@th0mas
Copy link
Collaborator Author

th0mas commented Sep 25, 2020

@nelsonic If you could go through this code so far for anything that you disagree with/think could be done better that would be great

@codecov
Copy link

codecov bot commented Oct 2, 2020

Codecov Report

Merging #27 into master will decrease coverage by 2.05%.
The diff coverage is 67.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #27      +/-   ##
==========================================
- Coverage   57.56%   55.50%   -2.06%     
==========================================
  Files          26       27       +1     
  Lines         205      218      +13     
==========================================
+ Hits          118      121       +3     
- Misses         87       97      +10     
Impacted Files Coverage Δ
lib/smart_home_auth.ex 100.00% <ø> (ø)
lib/smart_home_auth/access/door.ex 100.00% <ø> (ø)
lib/smart_home_auth_web/channels/lock_channel.ex 31.57% <0.00%> (-1.76%) ⬇️
...smart_home_auth_web/controllers/door_controller.ex 73.33% <57.14%> (-26.67%) ⬇️
lib/smart_home_auth_web/views/door_view.ex 90.00% <66.66%> (-10.00%) ⬇️
lib/smart_home_auth_web/controllers/rbac_auth.ex 75.00% <75.00%> (ø)
lib/smart_home_auth_web/controllers/user_mapper.ex 66.66% <75.00%> (ø)
lib/smart_home_auth/access.ex 100.00% <100.00%> (ø)
lib/smart_home_auth/account/user.ex 100.00% <100.00%> (ø)
lib/smart_home_auth_web/router.ex 27.27% <100.00%> (+7.27%) ⬆️
... and 1 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 f19dde7...1b04dd4. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate with RBAC
1 participant