-
Notifications
You must be signed in to change notification settings - Fork 14
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
base: main
Are you sure you want to change the base?
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?
<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
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?
|
||
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
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 full-featured UI for managing schema object permissions, migrates the old ACL section into Diagnostics, and deprecates the legacy Acl view in favor of an “Access” tab.
- Add a GrantAccess drawer component to grant or revoke permissions on schema objects.
- Create an “Access” diagnostics tab with AccessRights components (owner display, rights table, dialogs).
- Deprecate the old Acl component and redirect users to the new Diagnostics Access tab.
Reviewed Changes
Copilot reviewed 48 out of 48 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/containers/Tenant/GrantAccess/GrantAccess.tsx | Add GrantAccess drawer component and logic |
src/containers/Tenant/GrantAccess/GrantAccess.scss | Styles for the GrantAccess drawer |
src/containers/Tenant/Diagnostics/DiagnosticsPages.ts | Include “access” in diagnostics tab lists |
src/containers/Tenant/Diagnostics/Diagnostics.tsx | Render AccessRights when “access” tab is active |
src/containers/Tenant/Diagnostics/AccessRights/shared.ts | Define BEM block for AccessRights |
src/containers/Tenant/Diagnostics/AccessRights/i18n/index.ts | Register i18n keyset for AccessRights |
src/containers/Tenant/Diagnostics/AccessRights/i18n/en.json | Add English translations for AccessRights UI |
src/containers/Tenant/Diagnostics/AccessRights/components/RightsTable/columns.tsx | Define columns and headers for rights table |
src/containers/Tenant/Diagnostics/AccessRights/components/RightsTable/RightsTable.tsx | Implement resizable data table for rights |
src/containers/Tenant/Diagnostics/AccessRights/components/RightsTable/RevokeAllRightsDialog.tsx | Dialog component to revoke all explicit rights |
src/containers/Tenant/Diagnostics/AccessRights/components/RightsTable/Actions.tsx | Actions for granting and revoking rights per subject |
src/containers/Tenant/Diagnostics/AccessRights/components/Owner.tsx | Display and edit current object owner |
src/containers/Tenant/Diagnostics/AccessRights/components/ChangeOwnerDialog.tsx | Dialog component to change object owner |
src/containers/Tenant/Diagnostics/AccessRights/AccessRights.tsx | Main AccessRights view combining owner and rights table |
src/containers/Tenant/Diagnostics/AccessRights/AccessRights.scss | Styles for AccessRights components |
src/containers/Tenant/Acl/i18n/en.json | Remove old ACL keys, add redirect message |
src/containers/Tenant/Acl/Acl.tsx | Replace Acl with button that opens Diagnostics “Access” |
src/containers/Tenant/Acl/Acl.scss | Remove legacy Acl styles |
src/components/SubjectWithAvatar/SubjectWithAvatar.tsx | Introduce SubjectWithAvatar component for subject display |
src/components/SubjectWithAvatar/SubjectWithAvatar.scss | Styles for SubjectWithAvatar |
Comments suppressed due to low confidence (5)
src/containers/Tenant/GrantAccess/GrantAccess.tsx:33
- [nitpick] The new GrantAccess component contains complex state and API logic but lacks accompanying unit or integration tests. Consider adding tests to verify rights selection, save/discard behavior, and error handling.
export function GrantAccess({handleCloseDrawer}: GrantAccessProps) {
src/containers/Tenant/GrantAccess/GrantAccess.tsx:24
- The Import of './shared' for the BEM block helper will fail because there is no shared.ts in the GrantAccess folder. Consider adding a shared.ts file exporting the block utility or updating the import to point to an existing module.
import {block} from './shared';
src/containers/Tenant/Diagnostics/AccessRights/i18n/en.json:9
- The key 'descrtiption_empty-rights' contains a typo; it should be 'description_empty-rights'.
"descrtiption_empty-rights": "No access rights",
src/containers/Tenant/Diagnostics/AccessRights/i18n/en.json:10
- The key 'decription_enter-subject' contains a typo; it should be 'description_enter-subject'.
"decription_enter-subject": "Enter subject",
src/containers/Tenant/Diagnostics/AccessRights/i18n/en.json:18
- The key 'descripition_no-rights-to-revoke' contains a typo; it should be 'description_no-rights-to-revoke'.
"descripition_no-rights-to-revoke": "No rights to revoke",
Stand
closes #2353
CI Results
Test Status: ❌ FAILED
📊 Full Report
Test Changes Summary ⏭️1
⏭️ Skipped Tests (1)
Bundle Size: 🔺
Current: 83.90 MB | Main: 83.77 MB
Diff: +0.13 MB (0.15%)
ℹ️ CI Information