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

fix: Update of organisations during flags and admin access #4344

Merged

Conversation

zachaysan
Copy link
Contributor

Changes

There is code to automatically rebuild the environment document when API access has been enabled / disabled, but it relies on lifecycle hooks which only get called when models are saved individually. So the bulk update of the organisations around (un)restricting has been loosed to just normal .save() calls.

How did you test this code?

Since the import in the lifecycle hook code is local, I was unable to create a mock to verify the calls individually, so I just dropped a breakpoint() in the local section and verified that the relevant code was called from the pre-existing method.

@zachaysan zachaysan requested a review from a team as a code owner July 16, 2024 14:17
@zachaysan zachaysan requested review from khvn26 and removed request for a team July 16, 2024 14:17
Copy link

vercel bot commented Jul 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2024 2:17pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Jul 16, 2024 2:17pm
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Jul 16, 2024 2:17pm

@github-actions github-actions bot added api Issue related to the REST API fix labels Jul 16, 2024
Copy link
Contributor

github-actions bot commented Jul 16, 2024

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-4344 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-4344 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-4344 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-4344 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-4344 Finished ✅ Results

Copy link
Contributor

github-actions bot commented Jul 16, 2024

Uffizzi Preview deployment-54247 was deleted.

Copy link

codecov bot commented Jul 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.77%. Comparing base (56e6390) to head (5d4a0d8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4344   +/-   ##
=======================================
  Coverage   96.77%   96.77%           
=======================================
  Files        1159     1159           
  Lines       38079    38080    +1     
=======================================
+ Hits        36852    36853    +1     
  Misses       1227     1227           

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

@zachaysan zachaysan added this pull request to the merge queue Jul 18, 2024
Merged via the queue into main with commit 7a9edca Jul 18, 2024
33 checks passed
@zachaysan zachaysan deleted the fix/update_of_organisations_during_flags_and_admin_access branch July 18, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants