mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
fix bug: admin can't show his group
This commit is contained in:
parent
dfc37a3a3d
commit
b46ebe9dab
@ -41,7 +41,7 @@ export const ChangeGroup: React.FC<ChangeGroupProps> = ({ user, onSuccess, onErr
|
||||
const { handleSubmit, control } = useForm();
|
||||
|
||||
useEffect(() => {
|
||||
GroupAPI.index({ disabled: false, admins: false }).then(setGroups).catch(onError);
|
||||
GroupAPI.index({ disabled: false, admins: user?.role === 'admin' }).then(setGroups).catch(onError);
|
||||
MemberAPI.current().then(setOperator).catch(onError);
|
||||
SettingAPI.get(SettingName.UserChangeGroup).then((setting) => {
|
||||
setAllowedUserChangeGoup(setting.value === 'true');
|
||||
|
Loading…
x
Reference in New Issue
Block a user