AACEngineering / django-permissions-auditor

Tool to audit access control on your django app.
https://django-permissions-auditor.readthedocs.io/en/latest/
MIT License
20 stars 4 forks source link

Allow inherited permission mixins #13

Closed annamooseity closed 1 year ago

annamooseity commented 1 year ago

Changes the can_process code to look through an object's entire method resolution (uses __mro__ instead of __bases__).

Also fixed a misspelling, but that's in a completely separate commit so let me know if you'd rather me exclude those changes and/or open a separate PR.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (93c1f01) 92.30% compared to head (ed9e826) 92.30%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #13 +/- ## ======================================= Coverage 92.30% 92.30% ======================================= Files 8 8 Lines 351 351 Branches 81 81 ======================================= Hits 324 324 Misses 8 8 Partials 19 19 ``` | [Impacted Files](https://codecov.io/gh/AACEngineering/django-permissions-auditor/pull/13?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AACEngineering) | Coverage Δ | | |---|---|---| | [permissions\_auditor/processors/auth\_mixins.py](https://codecov.io/gh/AACEngineering/django-permissions-auditor/pull/13?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AACEngineering#diff-cGVybWlzc2lvbnNfYXVkaXRvci9wcm9jZXNzb3JzL2F1dGhfbWl4aW5zLnB5) | `100.00% <100.00%> (ø)` | | | [permissions\_auditor/processors/base.py](https://codecov.io/gh/AACEngineering/django-permissions-auditor/pull/13?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AACEngineering#diff-cGVybWlzc2lvbnNfYXVkaXRvci9wcm9jZXNzb3JzL2Jhc2UucHk=) | `96.47% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AACEngineering). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AACEngineering)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

kluchrj commented 1 year ago

Thanks, that's quite the typo! I rebased the PR to fix the tests.