Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael William Coughlin
GraceDB Server
Commits
f2976518
Commit
f2976518
authored
5 years ago
by
Tanner Prestegard
Committed by
GraceDB
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ligoauth: bugfix group removal code in shibboleth auth middleware
parent
0d0a68da
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gracedb/ligoauth/middleware.py
+4
-1
4 additions, 1 deletion
gracedb/ligoauth/middleware.py
with
4 additions
and
1 deletion
gracedb/ligoauth/middleware.py
+
4
−
1
View file @
f2976518
...
...
@@ -96,7 +96,10 @@ class ShibbolethWebAuthMiddleware(PersistentRemoteUserMiddleware):
# Remove groups in database which are not in session, except for groups
# which are managed by admins, like EM advocates and executives
user
.
groups
.
remove
(
*
user
.
groups
.
exclude
(
pk__in
=
session_groups
))
groups_to_remove
=
user
.
groups
.
filter
(
authgroup__ldap_name__isnull
=
False
).
exclude
(
pk__in
=
session_groups
)
user
.
groups
.
remove
(
*
groups_to_remove
)
# NOTE: The two above operations could be done much more nicely if
# the queryset operation difference() worked in MySQL
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment