fix: 用户管理内教师角色只能新增学生
This commit is contained in:
@@ -441,6 +441,11 @@ function fnModalOk() {
|
||||
.then(() => {
|
||||
modalState.confirmLoading = true;
|
||||
const from = toRaw(modalState.from);
|
||||
// 教师角色只能新增学生
|
||||
if (!from.userId && userStore.roles.includes('teacher')) {
|
||||
from.postIds = ['3'];
|
||||
from.roleIds = ['4'];
|
||||
}
|
||||
const user = from.userId ? updateUser(from) : addUser(from);
|
||||
const key = 'user';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
|
||||
Reference in New Issue
Block a user