Skip to content

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

feat: manage schema object permissions #2398

wants to merge 5 commits into from

Conversation

Raubzeug
Copy link
Contributor

@Raubzeug Raubzeug commented Jun 11, 2025

Stand
closes #2353

CI Results

Test Status: ❌ FAILED

📊 Full Report

Total Passed Failed Flaky Skipped
322 316 2 3 1
Test Changes Summary ⏭️1

⏭️ Skipped Tests (1)

  1. Scroll to row, get shareable link, navigate to URL and verify row is scrolled into view (tenant/diagnostics/tabs/queries.test.ts)

Bundle Size: 🔺

Current: 83.90 MB | Main: 83.77 MB
Diff: +0.13 MB (0.15%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@Raubzeug Raubzeug changed the title Access rights feat: manage schema object permissions Jun 11, 2025

const {handleShowGrantAccessChange} = useTenantQueryParams();

const loading = isFetching && !currentData;
Copy link
Collaborator

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) => {
Copy link
Collaborator

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
Copy link
Collaborator

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> = {
Copy link
Collaborator

@astandrik astandrik Jun 16, 2025

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

@astandrik astandrik requested a review from Copilot June 16, 2025 15:30
Copy link
Contributor

@Copilot Copilot AI left a 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",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement acl management
2 participants