Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pennlabs/platform into sr…
Browse files Browse the repository at this point in the history
…itan/health
  • Loading branch information
sritanmotati committed Feb 13, 2025
2 parents 579bf29 + d11857a commit 4f06e73
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/cdkactions_build-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ jobs:
RELEASE_NAME=${{ steps.synth.outputs.RELEASE_NAME }}
# Deploy
kubectl apply -f k8s/dist/ -l app.kubernetes.io/component=certificate
kubectl apply -f k8s/dist/ --prune -l app.kubernetes.io/part-of=$RELEASE_NAME
env:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
Expand Down
2 changes: 1 addition & 1 deletion backend/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/Platform/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
"write": "Write scope",
"introspection": "Introspect token scope",
},
"ALLOWED_REDIRECT_URI_SCHEMES": ["http", "https"],
"ALLOWED_REDIRECT_URI_SCHEMES": ["http", "https", "pennmobile"],
"PKCE_REQUIRED": False,
"OIDC_ENABLED": True,
"OIDC_RSA_PRIVATE_KEY": OIDC_RSA_PRIVATE_KEY,
Expand Down
7 changes: 4 additions & 3 deletions backend/accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,10 @@ def post(self, request, format=None):
)
for perm in perms:
perm.user_set.clear()
User.objects.filter(Q(is_superuser=True) | Q(is_staff=True)).update(
is_superuser=False, is_staff=False
)
users_to_reset = User.objects.filter(Q(is_staff=True)).exclude(
Q(is_superuser=True)
) # Superusers retain permissions across time
users_to_reset.update(is_superuser=False, is_staff=False)

try:
body = json.loads(request.body)
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/accounts/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ def test_remove_product_admin(self):

def test_remove_platform_admin(self):
self.user.is_staff = True
self.user.is_superuser = True
self.user.is_superuser = False
self.user.save()
response = self.client.post(
reverse("accounts:productadmin"),
Expand Down

0 comments on commit 4f06e73

Please sign in to comment.