feat(FR-1800): restrict model project folder permission to read-only#4852
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
Coverage report for
|
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
There was a problem hiding this comment.
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-folderin 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 |
nowgnuesLee
left a comment
There was a problem hiding this comment.
please update description of the PR
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
b94eb39 to
4df9d44
Compare

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:
allow-only-ro-permission-for-model-project-folderfor manager version 25.18.2+Checklist: