[docs] Roles and permissions concept and access governance flows - #61
Draft
github-actions[bot] wants to merge 1 commit into
Draft
[docs] Roles and permissions concept and access governance flows#61github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Deploying coredocs with
|
| Latest commit: |
d5ef042
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a8106dca.coredocs.pages.dev |
| Branch Preview URL: | https://docs-roles-and-permissions-6.coredocs.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ezhuthachan
Closes the request in #60 (
/document Access & Governance/Roles & Permissions).The request named a domain and a topic rather than a
domain/slug. I mapped it to the existingaccess-governancedomain and the existing concept pageconcepts/access-governance/access-control.mdx, which is titled Roles & Permissions.<doc-types>was omitted, so I wrote a concept plus the flows for the resource. References forrole,permission, andpermission-associationalready exist and are accurate to the code, so I did not change them.Files
Added, in
version-3.0and mirrored byte-identical toversion-3.1:flows/access-governance/create-a-role.mdxflows/access-governance/assign-a-role-to-a-user.mdxflows/access-governance/_category_.jsonRewritten (whole file replaced), in both versions:
concepts/access-governance/access-control.mdx— the previous page predated the concept template. It usedWhat it represents/How a grant works/How access cascades/Standard roles/Permissions/Related, and it put permission slugs (can_create_organization) and context literals (GENERIC,FACILITY) in user-facing text. It now follows the template —Definition,Key Attributeswith sub-sections,Permissions,Related— and uses the labels the user sees.Changed:
versioned_sidebars/version-3.0-sidebars.jsonandversioned_sidebars/version-3.1-sidebars.json— the flow sidebar is a manual list, so both new flows are added under a new Access & Governance flow category.The slug
access-controlis kept, becauseconcepts/access-governance/organization.mdxandconcepts/access-governance/user.mdxalready link to it.Traced to
care/security/roles/role.py— the 11 system roles, their descriptions, and theirRoleContextvalues.care/security/permissions/constants.py— thePermissionContextvalues.care/security/permissions/organization.py,care/security/permissions/user.py— permission display names and the default role lists.care/security/api/viewsets/roles.py—permissions_controller: list and retrieve are open to any authenticated user; create, update and delete require a super user.validate_destroyblocks deleting a system role.care/security/api/viewsets/permissions.py— permissions are read-only over the API.care/emr/resources/role/spec.py— unique name, at least one permission, system roles rejected on write.care/emr/api/viewsets/organization.py(authorize_create/authorize_update/authorize_destroy/authorize_retrieve,validate_data) andcare/security/authorization/organization.py(can_manage_organization_users_obj,check_role_subset) — the link/change/remove rules, including the "you cannot grant a role above your own" rule and the one-link-per-branch rule.care_fe/src/pages/Admin/Roles/RolesIndex.tsx,RoleForm.tsx,src/components/ui/sidebar/admin-nav.tsx,src/types/emr/role/role.ts— the Administration → RBAC → Roles screen, the Add Role panel, Clone, Select All / Clear, and the context labels.care_fe/src/pages/Organization/components/LinkUserSheet.tsx,EditUserRoleSheet.tsx— the Link User and Edit User Role panels, and the toast messages.care_fe/public/locale/en.json— every user-facing label and message, includingrole_context__role_org= Responsibility.Left out
RoleAssociation.expiryexists incare/security/models/permission_association.py, but I found no UI that sets it, so the concept mentions it in one sentence only and no flow documents it./admin/rbac/permissions) has no flow, because it is a read-only matrix with no user task.EditFacilityUserRoleSheet.tsx) — the request was about roles and permissions themselves, so I kept the flows to the role list and the organization grant.Build:
npm run buildis green forenandml, and the corruption scan returns nothing.