Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create cron job to re-give superuser to env-defined users #742

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

Conversation

julianweng
Copy link
Member

@julianweng julianweng commented Oct 22, 2024

Due to apparently broken team sync steps on the platform side, various administrators from OSA have found their permissions reset on a daily to weekly basis. This PR creates a (very) temporary, naive solution by busy-waiting and changing their permissions back to super-user on a regular basis (I'm not sure if team sync calls Clubs serializers to update users so subscribing to team sync changes might not be feasible).

To work in production, define an environment variable OSA_KEYS with a comma-separated list of valid PennKeys to enforce superuser on.

@julianweng julianweng marked this pull request as draft October 22, 2024 01:11
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 96.42857% with 1 line in your changes missing coverage. Please review.

Project coverage is 71.90%. Comparing base (109c44c) to head (02439d2).

Files with missing lines Patch % Lines
...end/clubs/management/commands/osa_perms_updates.py 96.42% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #742      +/-   ##
==========================================
+ Coverage   71.80%   71.90%   +0.09%     
==========================================
  Files          31       32       +1     
  Lines        6901     6929      +28     
==========================================
+ Hits         4955     4982      +27     
- Misses       1946     1947       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Successfully merging this pull request may close these issues.

2 participants