mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-07 19:15:05 +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:
@ -263,6 +263,8 @@ export default {
|
||||
adminLogout: `${ExternalApi}${api_host}/admin/logout`,
|
||||
adminListUsers: `${ExternalApi}${api_host}/admin/users`,
|
||||
adminCreateUser: `${ExternalApi}${api_host}/admin/users`,
|
||||
adminSetSuperuser: (username: string) =>
|
||||
`${ExternalApi}${api_host}/admin/users/${username}/admin`,
|
||||
adminGetUserDetails: (username: string) =>
|
||||
`${ExternalApi}${api_host}/admin/users/${username}`,
|
||||
adminUpdateUserStatus: (username: string) =>
|
||||
|
||||
@ -13,7 +13,8 @@ const storage = {
|
||||
return localStorage.getItem(UserInfo);
|
||||
},
|
||||
getUserInfoObject: () => {
|
||||
return JSON.parse(localStorage.getItem('userInfo') || '');
|
||||
const userInfoStr = localStorage.getItem(UserInfo);
|
||||
return userInfoStr ? JSON.parse(userInfoStr) : null;
|
||||
},
|
||||
setAuthorization: (value: string) => {
|
||||
localStorage.setItem(Authorization, value);
|
||||
|
||||
Reference in New Issue
Block a user