-
Notifications
You must be signed in to change notification settings - Fork 902
feat: Add update user roles action #1361
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
32cba83
Load roles and show them in the table
BrunoQuaresma b167995
Update types
BrunoQuaresma cabe385
Update API
BrunoQuaresma b71ede5
Update roles to fetch the site roles
BrunoQuaresma d5e749f
Merge branch 'main' of github.com:coder/coder into bq/fe/update-user-…
BrunoQuaresma 1e99a04
Add UI for update user roles
BrunoQuaresma 46add41
Set fixed RoleSelect width
BrunoQuaresma 16d1e7b
Fix UI to update user roles
BrunoQuaresma 1e93bd2
Do not display the success notification
BrunoQuaresma 82a60f8
Add role select storybook
BrunoQuaresma 9c0587e
Add missing tests
BrunoQuaresma c7c7b95
Add fail test case
BrunoQuaresma a01cb87
Update site/src/components/RoleSelect/RoleSelect.tsx
BrunoQuaresma f402da0
Update site/src/components/RoleSelect/RoleSelect.tsx
BrunoQuaresma 9f47873
Update site/src/pages/UsersPage/UsersPage.test.tsx
BrunoQuaresma 6cf12b5
Clear get roles error
BrunoQuaresma 16c3fe3
Fix storybook
BrunoQuaresma 9bd6ca5
Add comment about fetch the roles
BrunoQuaresma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add missing tests
- Loading branch information
commit 9c0587ecf3f3721701ade54d7ba93c52d95b1846
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { ComponentMeta, Story } from "@storybook/react" | ||
import React from "react" | ||
import { MockAdminRole, MockMemberRole, MockSiteRoles } from "../../testHelpers" | ||
import { RoleSelect, RoleSelectProps } from "./RoleSelect" | ||
|
||
export default { | ||
title: "components/RoleSelect", | ||
component: RoleSelect, | ||
} as ComponentMeta<typeof RoleSelect> | ||
|
||
const Template: Story<RoleSelectProps> = (args) => <RoleSelect {...args} /> | ||
|
||
export const Close = Template.bind({}) | ||
Close.args = { | ||
roles: MockSiteRoles, | ||
selectedRoles: [MockAdminRole, MockMemberRole], | ||
} | ||
|
||
export const Open = Template.bind({}) | ||
Open.args = { | ||
open: true, | ||
roles: MockSiteRoles, | ||
selectedRoles: [MockAdminRole, MockMemberRole], | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrunoQuaresma Just looking at merged PRs to learn - no action necessary here. Curious if there's a reason we're importing React given we're on version 17 instead of silencing the 'React must be in scope' warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, I think it is automatically added by an eslint role, but I'm not 100% sure.