Skip to content

Comments

feat(FR-1800): restrict model project folder permission to read-only#4852

Merged
graphite-app[bot] merged 1 commit intomainfrom
feat/FR-1800-restrict-model-project-folder-to-read-only
Dec 24, 2025
Merged

feat(FR-1800): restrict model project folder permission to read-only#4852
graphite-app[bot] merged 1 commit intomainfrom
feat/FR-1800-restrict-model-project-folder-to-read-only

Conversation

@ironAiken2
Copy link
Contributor

@ironAiken2 ironAiken2 commented Dec 18, 2025

resolves #4851 (FR-1800)

Restrict Model Project Folders to Read-Only Permission

This PR adds a feature to restrict model project folders to read-only permission. When creating a folder with usage mode set to "model" and type set to "project", the "Read & Write" permission option is disabled and shows a tooltip explaining that this permission is not supported for model store folders.

The implementation:

  • Adds validation to prevent selecting "Read & Write" permission for model project folders
  • Disables the "Read & Write" radio button with a warning icon and tooltip
  • Adds a new feature flag allow-only-ro-permission-for-model-project-folder for manager version 25.18.2+
  • Adds translations for the new error message in all supported languages

Checklist:

  • Documentation
  • Minium required manager version: 25.18.2
  • Specific setting for review: Create a folder with usage mode "model" and type "project"
  • Minimum requirements to check during review: Verify that "Read & Write" permission is disabled for model project folders

@github-actions github-actions bot added area:lib Library and SDK related issue. area:ux UI / UX issue. area:i18n Localization size:M 30~100 LoC labels Dec 18, 2025
Copy link
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 4.2% 496/11813
🔴 Branches 3.62% 298/8225
🔴 Functions 2.53% 92/3637
🔴 Lines 4.17% 482/11556

Test suite run success

144 tests passing in 13 suites.

Report generated by 🧪jest coverage report action from 4df9d44

@ironAiken2 ironAiken2 marked this pull request as ready for review December 18, 2025 04:02
Copilot AI review requested due to automatic review settings December 18, 2025 04:02
Copy link
Contributor

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 implements a feature to restrict model project folders to read-only permissions when mounting them in sessions. It introduces a new feature flag gated by manager version 25.18.2 that prevents users from selecting 'Read & Write' permission for model store folders with project ownership type.

Key changes:

  • Added feature flag allow-only-ro-permission-for-model-project-folder in the backend client
  • Enhanced folder creation UI to disable and validate RW permission for model project folders
  • Added translations in 21 languages for the restriction error message

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/lib/backend.ai-client-esm.ts Adds feature flag check for manager version 25.18.2
react/src/components/FolderCreateModal.tsx Implements UI logic to disable RW permission radio button and adds validation for model project folders
resources/i18n/en.json Adds English translation for the restriction message
resources/i18n/ko.json Adds Korean translation for the restriction message
resources/i18n/ja.json Adds Japanese translation for the restriction message
resources/i18n/zh-CN.json Adds Chinese (Simplified) translation for the restriction message
resources/i18n/zh-TW.json Adds Chinese (Traditional) translation for the restriction message
resources/i18n/de.json Adds German translation for the restriction message
resources/i18n/es.json Adds Spanish translation for the restriction message
resources/i18n/fr.json Adds French translation for the restriction message
resources/i18n/it.json Adds Italian translation for the restriction message
resources/i18n/pt.json Adds Portuguese translation for the restriction message
resources/i18n/pt-BR.json Adds Brazilian Portuguese translation for the restriction message
resources/i18n/ru.json Adds Russian translation for the restriction message
resources/i18n/tr.json Adds Turkish translation for the restriction message
resources/i18n/pl.json Adds Polish translation for the restriction message
resources/i18n/th.json Adds Thai translation for the restriction message
resources/i18n/vi.json Adds Vietnamese translation for the restriction message
resources/i18n/ms.json Adds Malay translation for the restriction message
resources/i18n/mn.json Adds Mongolian translation for the restriction message
resources/i18n/id.json Adds Indonesian translation for the restriction message
resources/i18n/el.json Adds Greek translation for the restriction message
resources/i18n/fi.json Adds Finnish translation for the restriction message

Copy link
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update description of the PR

Copy link
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ironAiken2 ironAiken2 requested a review from agatha197 December 24, 2025 05:26
Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@graphite-app
Copy link

graphite-app bot commented Dec 24, 2025

Merge activity

…4852)

resolves #4851 ([FR-1800](https://lablup.atlassian.net/browse/FR-1800?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ))

### Restrict Model Project Folders to Read-Only Permission

This PR adds a feature to restrict model project folders to read-only permission. When creating a folder with usage mode set to "model" and type set to "project", the "Read & Write" permission option is disabled and shows a tooltip explaining that this permission is not supported for model store folders.

The implementation:

- Adds validation to prevent selecting "Read & Write" permission for model project folders
- Disables the "Read & Write" radio button with a warning icon and tooltip
- Adds a new feature flag `allow-only-ro-permission-for-model-project-folder` for manager version 25.18.2+
- Adds translations for the new error message in all supported languages

**Checklist:**

- [x] Documentation
- [x] Minium required manager version: 25.18.2
- [x] Specific setting for review: Create a folder with usage mode "model" and type "project"
- [x] Minimum requirements to check during review: Verify that "Read & Write" permission is disabled for model project folders

[FR-1800]: https://lablup.atlassian.net/browse/FR-1800?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app bot force-pushed the feat/FR-1800-restrict-model-project-folder-to-read-only branch from b94eb39 to 4df9d44 Compare December 24, 2025 06:49
@graphite-app graphite-app bot merged commit 4df9d44 into main Dec 24, 2025
11 checks passed
@graphite-app graphite-app bot deleted the feat/FR-1800-restrict-model-project-folder-to-read-only branch December 24, 2025 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Localization area:lib Library and SDK related issue. area:ux UI / UX issue. size:M 30~100 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow only 'Read-Only' permission when creating project folder for model

3 participants