Skip to content

hotfix(FR-802): Disable Delete Button for Users with 'User' Role#3479

Merged
graphite-app[bot] merged 1 commit into
mainfrom
hotfix_FR-802_/disable-delete-button-for-user-role
Apr 11, 2025
Merged

hotfix(FR-802): Disable Delete Button for Users with 'User' Role#3479
graphite-app[bot] merged 1 commit into
mainfrom
hotfix_FR-802_/disable-delete-button-for-user-role

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented Apr 10, 2025

Resolves #3476 (FR-802)

Disable "Move to Trash" button for users on group-owned folders

This PR prevents users from moving project folders to trash by disabling the "Move to Trash" button for group-owned folders when the current user has a 'user' role. The button is visually disabled and shows a tooltip explaining that users cannot delete project folders.

  • project folder with 'user' role
    image.png

  • general folder
    image.png

Checklist:

  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

@github-actions github-actions Bot added area:ux UI / UX issue. area:i18n Localization size:M 30~100 LoC labels Apr 10, 2025
Copy link
Copy Markdown
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
Copy Markdown
Contributor

github-actions Bot commented Apr 10, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 4.22% 408/9675
🔴 Branches 3.6% 240/6672
🔴 Functions 2.56% 79/3089
🔴 Lines 4.15% 393/9462

Test suite run success

124 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from 7bed42c

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

Copy link
Copy Markdown
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.

Let's improve the tooltip message.

@agatha197 agatha197 force-pushed the hotfix_FR-802_/disable-delete-button-for-user-role branch from 59ba5fe to e9ff3b9 Compare April 11, 2025 04:35
@agatha197 agatha197 requested a review from yomybaby April 11, 2025 04:37
Copy link
Copy Markdown
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
Copy Markdown

graphite-app Bot commented Apr 11, 2025

Merge activity

Resolves #3476 ([FR-802](https://lablup.atlassian.net/browse/FR-802))

# Disable "Move to Trash" button for users on group-owned folders

This PR prevents users from moving project folders to trash by disabling the "Move to Trash" button for group-owned folders when the current user has a 'user' role. The button is visually disabled and shows a tooltip explaining that users cannot delete project folders.

- project folder with 'user' role
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/2HueYSdFvL8pOB5mgrUQ/b4bf8c27-6cad-4ccb-898c-c62b5f9c8127.png)

- general folder
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/2HueYSdFvL8pOB5mgrUQ/13ba5723-af38-4863-bd97-0659cbf61e70.png)

**Checklist:**

- [x] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after

[FR-802]: https://lablup.atlassian.net/browse/FR-802?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app Bot force-pushed the hotfix_FR-802_/disable-delete-button-for-user-role branch from e9ff3b9 to 7bed42c Compare April 11, 2025 04:58
@graphite-app graphite-app Bot merged commit 7bed42c into main Apr 11, 2025
6 checks passed
@graphite-app graphite-app Bot deleted the hotfix_FR-802_/disable-delete-button-for-user-role branch April 11, 2025 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Localization area:ux UI / UX issue. size:M 30~100 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

delete button should be disabled if user cannot delete folder

3 participants