Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

提个bug:用户管理中,管理员能所有账号清空,然后系统就没有用户可以登录了 #114

Open
guangxf opened this issue Mar 6, 2022 · 2 comments

Comments

@guangxf
Copy link

guangxf commented Mar 6, 2022

Overview of the problem

员工管理可以删除当前登录账号

Description

用户管理中,管理员能所有账号清空,然后系统就没有用户可以登录了

Steps to reproduce

admin登录->员工管理,勾选所有账号,点删除,提示删除成功。
然后退出重新登陆,发现没有账号可以登录。

Expected behavior

不可以将当前登录账号删除

Actual behavior

当前登录账号已删除

@guangxf
Copy link
Author

guangxf commented Mar 6, 2022

pull request 不了了。
解决方法如下:

1,在文件 YiSha.Web\YiSha.Admin.Web\Areas\OrganizationManage\Views\User
的196行增加
if (ids.indexOf('@ViewBag.OperatorInfo.UserId') >= 0) {
ys.msgError("当前登录用户不允许被删除");
return;
}

2,在文件 UserController 控制器 29行增加
ViewBag.OperatorInfo =await Operator.Instance.Current();

@liukuo362573
Copy link
Owner

谢谢反馈 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants