-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 #163
base: dev
Are you sure you want to change the base?
新增新功能并解决存在的bug #163
Conversation
@@ -92,7 +92,7 @@ public String addOneAppForUser(Long userId, int appId) { | |||
User user = getUser(userId); | |||
|
|||
String ownAppIds = user.getOwnApps(); | |||
if ("admin".equals(user.getName())) { | |||
if ("admin".equals(user.getName()) && StringUtils.isNotBlank(ownAppIds)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要用admin字符进行判断是否是管理员
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"admin"只是一个很特殊的用户,而并不是简单的管理员,这样做,是将admin唯一的管理员权限,下发到各个部门各自有自己的管理,这样便于脱离"中心管理",当然也可以去掉这个特殊情况,但是这样,就没有一个整体的管控了、、、
需要进行优化下 |
user.setName(regUserName); | ||
user.setPassword(SignUtils.createPassword(regPwd)); | ||
user.setToken(SignUtils.createToken(regUserName)); | ||
user.setOwnApps("0"); | ||
//此处给管理员的权限,就是为了admin中心权限,下方到各个部门权限 | ||
user.setRoleId(RoleEnum.ADMIN.getValue()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这样以后所有注册的用户都是管理员了?
下门到各个部分权限的意思是?
为了方便更多用户的管理,针对源码做了如下修改: