File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
site/src/pages/ManagementSettingsPage/CustomRolesPage Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ export const CreateGroupPage: FC = () => {
39
39
</ Helmet >
40
40
< CreateEditRolePageView
41
41
role = { role }
42
- organization = { organization }
43
42
onSubmit = { async ( data ) => {
44
43
try {
45
44
await patchOrganizationRoleMutation . mutateAsync ( data ) ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { isApiValidationError } from "api/errors";
14
14
import { RBACResourceActions } from "api/rbacresources_gen" ;
15
15
import type {
16
16
Role ,
17
+ PatchRoleRequest ,
17
18
Permission ,
18
19
AssignableRoles ,
19
20
RBACResource ,
@@ -35,24 +36,21 @@ const validationSchema = Yup.object({
35
36
36
37
export type CreateEditRolePageViewProps = {
37
38
role : AssignableRoles | undefined ;
38
- organization : string ;
39
39
onSubmit : ( data : Role ) => void ;
40
40
error ?: unknown ;
41
41
isLoading : boolean ;
42
42
} ;
43
43
44
44
export const CreateEditRolePageView : FC < CreateEditRolePageViewProps > = ( {
45
45
role,
46
- organization,
47
46
onSubmit,
48
47
error,
49
48
isLoading,
50
49
} ) => {
51
50
const navigate = useNavigate ( ) ;
52
- const form = useFormik < Role > ( {
51
+ const form = useFormik < PatchRoleRequest > ( {
53
52
initialValues : {
54
53
name : role ?. name || "" ,
55
- organization_id : role ?. organization_id || organization ,
56
54
display_name : role ?. display_name || "" ,
57
55
site_permissions : role ?. site_permissions || [ ] ,
58
56
organization_permissions : role ?. organization_permissions || [ ] ,
You can’t perform that action at this time.
0 commit comments