social-core icon indicating copy to clipboard operation
social-core copied to clipboard

Cas group allow

Open slyngshede opened this issue 1 year ago • 2 comments

Allow the user to configure a group whitelist. Any user not a member of the one or more of the whitelisted groups will not allowed to authenticate, if the social_auth.auth_allowed is enabled.

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

Please check the type of change your PR introduces:

  • [ ] Release (new release request)
  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Code style update (PEP8, lint, formatting, renaming, etc)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Build related changes (build process, tests runner, etc)
  • [ ] Other (please describe):

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • [x] Lint and unit tests pass locally with my changes
  • [x] I have added tests that prove my fix is effective or that my feature works

Other information

Any other information that is important to this PR such as screenshots of how the component looks before and after the change.

slyngshede avatar May 23 '23 09:05 slyngshede

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 77.82%. Comparing base (d216c96) to head (0362b78). Report is 4 commits behind head on master.

:exclamation: Current head 0362b78 differs from pull request most recent head c2d74f3. Consider uploading reports for the commit c2d74f3 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #801      +/-   ##
==========================================
+ Coverage   77.77%   77.82%   +0.04%     
==========================================
  Files         347      330      -17     
  Lines       10606    10097     -509     
  Branches      699     1194     +495     
==========================================
- Hits         8249     7858     -391     
+ Misses       2200     2086     -114     
+ Partials      157      153       -4     
Flag Coverage Δ
unittests 77.82% <100.00%> (+0.04%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 23 '23 09:05 codecov[bot]

Can you please add tests for this?

nijel avatar Sep 12 '23 05:09 nijel