-
Notifications
You must be signed in to change notification settings - Fork 4
Regenerate permissions documentation from backend source #1165
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
- Add scripts/generate_permissions_docs.py to generate permissions tables from backend source files (data.json and org_initials.json) - Replace hardcoded permissions tables with auto-generated content - Add 18 previously missing resources (Attestation, Analytics, etc.) - Add missing permissions (workflow execution, delete comments, etc.) - Document model-level permissions with correct roles: - Model Owner, Model Developer, Model Validator, Basic User - Apply UI terminology mapping (Finding -> Artifact) - Add role descriptions for both org-level and model-level roles - Restructure page to explain two-level permission system
ea43c70 to
eddfcc4
Compare
|
Pull requests must include at least one of the required labels: |
3 similar comments
|
Pull requests must include at least one of the required labels: |
|
Pull requests must include at least one of the required labels: |
|
Pull requests must include at least one of the required labels: |
60a5ae5 to
c3b52b8
Compare
|
Pull requests must include at least one of the required labels: |
PR SummaryThis PR introduces a new script (scripts/generate_permissions_docs.py) that auto-generates permissions documentation from backend source JSON files. The script reads resource and permission definitions from two files in the backend repository and outputs updated Quarto markdown files (e.g., site/guide/configuration/_permissions-generated.qmd). In addition, the README.md and site documentation files have been updated to include instructions on how to run the permissions documentation generation script. The changes ensure that when permission definitions in the backend are updated, developers can easily regenerate the documentation to keep it in sync with the backend configuration. Key functional changes:
These enhancements automate the update process for permissions documentation, reduce the risk of discrepancies between code and documentation, and improve maintainability across the project. Test Suggestions
|
Code ReviewFound 1 issue: Python 3.9 Compatibility IssueLocation: The function On Python 3.9, importing this module will fail with: Fix: Either:
Note: Even though |
Validate docs site✓ INFO: A live preview of the docs site is available — Open the preview |
Lighthouse check resultsShow Lighthouse scoresFolder depth level checked: 0 Commit SHA: 33e2c62 Modify the workflow to check a different depth:
|
Lighthouse check resultsShow Lighthouse scoresFolder depth level checked: 0 Commit SHA: 3d1faa3 Modify the workflow to check a different depth:
|
Pull Request Description
What and why?
[sc-5927] Overhaul of permissions documentation to match the actual backend implementation.
Before: Hardcoded permissions tables that were outdated and incomplete:
After: Auto-generated documentation from backend source files:
scripts/generate_permissions_docs.pyto generate permissions from:backend/src/backend/templates/platform_resources/data.json(resources/actions)backend/src/backend/templates/platform_resources/org_initials.json(role permissions)How to test
data.jsonandorg_initials.jsonto confirm accuracypython scripts/generate_permissions_docs.pyWhat needs special review?
Dependencies, breaking changes, and deployment notes
../backend/) — CI should clone the backend repo if we want to regenerate during build.Release notes
Updated permissions documentation to accurately reflect the platform's two-level permission system. The documentation now includes all available permissions for both organization-level and model-level roles, generated directly from the backend source to ensure accuracy.
Checklist