-
Notifications
You must be signed in to change notification settings - Fork 435
feat(5308): Add endpoints to support permission debugging #5408
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
Uffizzi Ephemeral Environment Deploying☁️ https://app.uffizzi.com/github.com/Flagsmith/flagsmith/pull/5408 ⚙️ Updating now by workflow run 14882706414. What is Uffizzi? Learn more! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements new endpoints and corresponding tests for retrieving detailed permissions information for projects, organisations, and environments to aid in permission debugging. Key changes include:
- Addition of new detailed permissions endpoints and related test cases.
- Updates to serializers and permission calculation logic to support the detailed permissions structure.
- Modifications to views and permission checks to ensure only authorized users can access detailed permission information.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
api/tests/unit/projects/test_unit_projects_views.py | Added tests for detailed permissions endpoint for projects. |
api/tests/unit/permissions/test_unit_permissions_calculator.py | Added a new test for converting permission data to detailed permissions, along with updates for role permission data. |
api/tests/unit/organisations/test_unit_organisations_views.py | Added tests for detailed permissions endpoint for organisations. |
api/tests/unit/environments/test_unit_environments_views.py | Added tests for detailed permissions endpoint for environments. |
api/projects/views.py | Introduced a new action (detailed_permissions) to get detailed permissions for a user. |
api/projects/permissions.py | Extended permission check to include the detailed_permissions action. |
api/permissions/serializers.py | Added detailed permissions serializers to support the new endpoint responses. |
api/permissions/rbac_wrapper.py | Removed an unused RolePermissionData import. |
api/permissions/permissions_calculator.py | Updated permission data classes and added a method to convert permission data into detailed permissions data. |
api/organisations/views.py | Added a detailed_permissions endpoint for organisations. |
api/organisations/permissions/permissions.py | Updated permission checks for detailed permissions in organisations. |
api/environments/views.py | Added a detailed_permissions endpoint for environments. |
api/environments/permissions/permissions.py | Updated permission checks for detailed permissions in environments. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5408 +/- ##
==========================================
+ Coverage 97.61% 97.64% +0.02%
==========================================
Files 1237 1239 +2
Lines 42975 43303 +328
==========================================
+ Hits 41952 42285 +333
+ Misses 1023 1018 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -29,7 +28,7 @@ | |||
from environments.models import Environment | |||
from users.models import FFAdminUser | |||
|
|||
|
|||
# Some random comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Some random comment |
Thanks for submitting a PR! Please check the boxes below:
docs/
if required so people know about the feature!Changes
Implement Endpoints defined here
How did you test this code?