Skip to content

feat(FR-826): allow role setting when creating a new user#3491

Merged
graphite-app[bot] merged 1 commit into
mainfrom
feat_FR-826_/allow-role-setting-when-creating-users
Apr 16, 2025
Merged

feat(FR-826): allow role setting when creating a new user#3491
graphite-app[bot] merged 1 commit into
mainfrom
feat_FR-826_/allow-role-setting-when-creating-users

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented Apr 11, 2025

Resolves #3490 (FR-826)

Refactor form handling in FolderCreateModal and fix UserSettingModal role check

This PR makes two improvements:

  1. In FolderCreateModal.tsx, simplifies the mutation function by using the spread operator to pass form values instead of explicitly listing each field.

  2. In UserSettingModal.tsx, fixes a potential bug by removing an unnecessary check for user?.role when determining whether to display the role selection dropdown. The condition now only depends on currentUserRole being defined and having appropriate permissions.

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

Copy link
Copy Markdown
Contributor Author

agatha197 commented Apr 11, 2025


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 11, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 4.18% 409/9790
🔴 Branches 3.54% 240/6771
🔴 Functions 2.54% 79/3112
🔴 Lines 4.11% 394/9575

Test suite run success

124 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from c7132ce

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.

LGTM

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 16, 2025

Merge activity

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

# Refactor form handling in FolderCreateModal and fix UserSettingModal role check

This PR makes two improvements:

1. In `FolderCreateModal.tsx`, simplifies the mutation function by using the spread operator to pass form values instead of explicitly listing each field.

2. In `UserSettingModal.tsx`, fixes a potential bug by removing an unnecessary check for `user?.role` when determining whether to display the role selection dropdown. The condition now only depends on `currentUserRole` being defined and having appropriate permissions.

**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

[FR-826]: https://lablup.atlassian.net/browse/FR-826?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app Bot force-pushed the feat_FR-826_/allow-role-setting-when-creating-users branch from 940eb0c to c7132ce Compare April 16, 2025 07:03
@graphite-app graphite-app Bot merged commit c7132ce into main Apr 16, 2025
6 checks passed
@graphite-app graphite-app Bot deleted the feat_FR-826_/allow-role-setting-when-creating-users branch April 16, 2025 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS ~10 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow role setting when creating a new user

3 participants