mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-30 23:26:36 +08:00
feat: support admin assign superuser in admin ui (#12798)
### What problem does this PR solve? Allow superuser(admin) to grant or revoke other superuser. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -157,6 +157,13 @@ export const createUser = (email: string, password: string) =>
|
||||
username: email,
|
||||
password,
|
||||
});
|
||||
|
||||
export const grantSuperuser = (email: string) =>
|
||||
request.put<ResponseData<void>>(api.adminSetSuperuser(email));
|
||||
|
||||
export const revokeSuperuser = (email: string) =>
|
||||
request.delete<ResponseData<void>>(api.adminSetSuperuser(email));
|
||||
|
||||
export const getUserDetails = (email: string) =>
|
||||
request.get<ResponseData<[AdminService.UserDetail]>>(
|
||||
adminGetUserDetails(email),
|
||||
|
||||
Reference in New Issue
Block a user