-
Notifications
You must be signed in to change notification settings - Fork 15
feat: manage schema object permissions #2398
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
Conversation
|
||
const {handleShowGrantAccessChange} = useTenantQueryParams(); | ||
|
||
const loading = isFetching && !currentData; |
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.
why cant isLoading be used here?
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.
it seems we can
<Dialog open={open} size="s" onClose={onClose}> | ||
<Dialog.Header caption={i18n('action_change-owner')} /> | ||
<form | ||
onSubmit={(e) => { |
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.
AFAIK We use react-hook-form for forms in this project
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.
actually, no need in form here
return ( | ||
<Dialog open={open} size="s" onClose={onClose}> | ||
<Dialog.Header caption={i18n('label_revoke-all-rights')} /> | ||
<form |
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.
Why do we need form here?
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.
No need indeed
|
||
export const block = cn('ydb-grant-access'); | ||
|
||
export const HumanReadableRights: Record<string, number> = { |
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.
RightsCodes ? or AccessRights. Dont think numbers are human-readable
|
||
const VIEW_PAGES = [overview, schema, describe]; | ||
const VIEW_PAGES = [overview, schema, describe, access]; |
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.
maybe we could like
const COMMON_PAGES = [overview, access,....]
and then
const TABLE_PAGES = [...COMMON_PAGES, someOtherPage]
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.
It seems no use... only overview
is always first page. Others are mixed for different views.
// if (subjectText.includes(searchText)) { | ||
// return true; | ||
// } | ||
// } |
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.
Commented code
// } | ||
|
||
// return false; | ||
// } |
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.
commented code
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.
omg, sorry
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 introduces a new diagnostics-based UI for managing schema object permissions, including granting, revoking, and changing ownership, while deprecating the legacy Acl panel.
- Added a dedicated GrantAccess drawer for selecting subjects and updating rights.
- Created an AccessRights diagnostics tab with owner card, rights table, and dialogs for revoke-all and change-owner.
- Removed the legacy Acl component and updated navigation to point to the new diagnostics access tab.
Reviewed Changes
Copilot reviewed 52 out of 52 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/containers/Tenant/GrantAccess/GrantAccess.tsx | New drawer component to grant/revoke permissions |
src/containers/Tenant/GrantAccess/GrantAccess.scss | Styles for the GrantAccess drawer |
src/containers/Tenant/Diagnostics/DiagnosticsPages.ts | Registered new access tab in diagnostics page mappings |
src/containers/Tenant/Diagnostics/Diagnostics.tsx | Render AccessRights component in diagnostics when tab=access |
src/containers/Tenant/Diagnostics/AccessRights/shared.ts | BEM block helper for AccessRights |
src/containers/Tenant/Diagnostics/AccessRights/i18n/index.ts | i18n keyset registration for AccessRights |
src/containers/Tenant/Diagnostics/AccessRights/i18n/en.json | Locale strings for AccessRights |
src/containers/Tenant/Diagnostics/AccessRights/components/RightsTable/columns.tsx | Defines columns for explicit/effective rights table |
src/containers/Tenant/Diagnostics/AccessRights/components/RightsTable/RightsTable.tsx | Data-table wrapper component for rights |
src/containers/Tenant/Diagnostics/AccessRights/components/RightsTable/RevokeAllRightsDialog.tsx | Modal dialog for revoking all rights |
src/containers/Tenant/Diagnostics/AccessRights/components/RightsTable/Actions.tsx | Actions (grant/revoke) buttons for each subject |
src/containers/Tenant/Diagnostics/AccessRights/components/Owner.tsx | Owner card with change-owner action |
src/containers/Tenant/Diagnostics/AccessRights/components/ChangeOwnerDialog.tsx | Modal dialog for changing object owner |
src/containers/Tenant/Diagnostics/AccessRights/AccessRights.tsx | Top-level AccessRights page (error/loading/data) |
src/containers/Tenant/Diagnostics/AccessRights/AccessRights.scss | Styles for AccessRights page |
src/containers/Tenant/Acl/i18n/en.json | Removed legacy ACL keys, added navigation-to-diagnostics |
src/containers/Tenant/Acl/Acl.tsx | Deprecated ACL panel, now links to diagnostics |
src/containers/Tenant/Acl/Acl.scss | Removed legacy ACL styles |
src/components/SubjectWithAvatar/SubjectWithAvatar.tsx | Avatar+text component for subjects |
src/components/SubjectWithAvatar/SubjectWithAvatar.scss | Styles for SubjectWithAvatar |
"label_explicit-rights": "Explicit rights", | ||
"label_effective-rights": "Effective rights", | ||
"label_subject": "Subject", | ||
"descrtiption_empty-rights": "No access rights", |
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.
Typo in key name: 'descrtiption_empty-rights' should be 'description_empty-rights'.
"descrtiption_empty-rights": "No access rights", | |
"description_empty-rights": "No access rights", |
Copilot uses AI. Check for mistakes.
"label_effective-rights": "Effective rights", | ||
"label_subject": "Subject", | ||
"descrtiption_empty-rights": "No access rights", | ||
"decription_enter-subject": "Enter subject", |
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.
Typo in key name: 'decription_enter-subject' should be 'description_enter-subject'.
"decription_enter-subject": "Enter subject", | |
"description_enter-subject": "Enter subject", |
Copilot uses AI. Check for mistakes.
"description_effective-rights": "Total active permissions from inheritance and direct grants", | ||
"action_revoke": "Revoke", | ||
"label_revoke-all-rights": "Revoke all explicit rights", | ||
"descripition_no-rights-to-revoke": "No rights to revoke", |
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.
Typo in key name: 'descripition_no-rights-to-revoke' should be 'description_no-rights-to-revoke'.
"descripition_no-rights-to-revoke": "No rights to revoke", | |
"description_no-rights-to-revoke": "No rights to revoke", |
Copilot uses AI. Check for mistakes.
Stand
closes #2353
CI Results
Test Status: β PASSED
π Full Report
Test Changes Summary β¨1 ποΈ163
β¨ New Tests (1)
ποΈ Deleted Tests (163)
Bundle Size: πΊ
Current: 83.90 MB | Main: 83.77 MB
Diff: +0.13 MB (0.15%)
βΉοΈ CI Information