mirror of
https://github.com/coder/coder.git
synced 2026-10-24 01:26:25 +08:00
fix: Role assign ui fixes (#3521)
Co-authored-by: Kira Pilot <kira@coder.com>
This commit is contained in:
co-authored by
Kira Pilot
parent
4b6a82f92a
commit
4be61d9250
+2
-2
@@ -311,8 +311,8 @@ export const updateUserPassword = async (
|
||||
updatePassword: TypesGen.UpdateUserPasswordRequest,
|
||||
): Promise<undefined> => axios.put(`/api/v2/users/${userId}/password`, updatePassword)
|
||||
|
||||
export const getSiteRoles = async (): Promise<Array<TypesGen.Role>> => {
|
||||
const response = await axios.get<Array<TypesGen.Role>>(`/api/v2/users/roles`)
|
||||
export const getSiteRoles = async (): Promise<Array<TypesGen.AssignableRoles>> => {
|
||||
const response = await axios.get<Array<TypesGen.AssignableRoles>>(`/api/v2/users/roles`)
|
||||
return response.data
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,11 @@ export interface AgentGitSSHKey {
|
||||
readonly private_key: string
|
||||
}
|
||||
|
||||
// From codersdk/roles.go
|
||||
export interface AssignableRoles extends Role {
|
||||
readonly assignable: boolean
|
||||
}
|
||||
|
||||
// From codersdk/users.go
|
||||
export interface AuthMethods {
|
||||
readonly password: boolean
|
||||
|
||||
Reference in New Issue
Block a user