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

Merged
merged 4 commits into from
Nov 1, 2024

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.88%. Comparing base (63c7a7d) to head (8be21ce).
Report is 1 commits behind head on master.

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.78%   71.88%   +0.09%     
==========================================
  Files          31       32       +1     
  Lines        6905     6933      +28     
==========================================
+ Hits         4957     4984      +27     
- Misses       1948     1949       +1     

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

@aviupadhyayula aviupadhyayula requested a review from esinx October 22, 2024 02:20
@julianweng julianweng requested a review from rm03 October 22, 2024 17:52
@julianweng julianweng marked this pull request as ready for review November 1, 2024 21:25
@julianweng julianweng merged commit 3a002c4 into master Nov 1, 2024
8 checks passed
@julianweng julianweng deleted the osa-perms-overwrite-patch branch November 1, 2024 23:28
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