File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
apps/admin/src/lib/services Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 4
4
import _ from 'lodash'
5
5
6
6
import { EnvironmentConfig } from '~/config'
7
- import { xhrDeleteAsync , xhrGetAsync , xhrPostAsync } from '~/libs/core'
7
+ import {
8
+ xhrDeleteAsync ,
9
+ xhrGetAsync ,
10
+ xhrPatchAsync ,
11
+ xhrPostAsync ,
12
+ } from '~/libs/core'
8
13
9
14
import { adjustUserRoleResponse , UserRole } from '../models'
10
15
@@ -63,9 +68,9 @@ export const createRole = async (roleName: string): Promise<UserRole> => {
63
68
export const assignRole = async (
64
69
roleId : string ,
65
70
userId : string ,
66
- ) : Promise < string > => xhrPostAsync < undefined , string > (
67
- `${ EnvironmentConfig . API . V6 } /roles/${ roleId } /assign?action=true&filter=subjectID%3D ${ userId } ` ,
68
- undefined ,
71
+ ) : Promise < string > => xhrPatchAsync < { roleId : string } , string > (
72
+ `${ EnvironmentConfig . API . V6 } /user- roles/${ userId } ` ,
73
+ { roleId } ,
69
74
)
70
75
71
76
/**
@@ -78,7 +83,7 @@ export const unassignRole = async (
78
83
roleId : string ,
79
84
userId : string ,
80
85
) : Promise < string > => xhrDeleteAsync < string > (
81
- `${ EnvironmentConfig . API . V6 } /roles/${ roleId } /deassign?action=true&filter=subjectID%3D ${ userId } ` ,
86
+ `${ EnvironmentConfig . API . V6 } /user- roles/${ userId } / ${ roleId } ` ,
82
87
)
83
88
84
89
/**
Original file line number Diff line number Diff line change @@ -61,10 +61,7 @@ export const VANILLA_FORUM = {
61
61
V2_URL : 'https://vanilla.topcoder-dev.com/api/v2' ,
62
62
}
63
63
64
- const ADMIN_SSO_LOGIN_PROVIDERS_ENV = getReactEnv < string | undefined > (
65
- 'ADMIN_SSO_LOGIN_PROVIDERS' ,
66
- undefined ,
67
- )
64
+ const ADMIN_SSO_LOGIN_PROVIDERS_ENV = '[{"ssoLoginProviderId":1,"name":"okta-customer","type":"samlp"}]'
68
65
69
66
export const ADMIN_SSO_LOGIN_PROVIDERS : SSOLoginProviderConfig [ ] = parseSSOLoginProviders (
70
67
ADMIN_SSO_LOGIN_PROVIDERS_ENV ,
You can’t perform that action at this time.
0 commit comments