Commit 96f225f6 by guojuxing

如果是子管理员,不能编辑

parent 7f3304a7
package com.gic.auth.web.controller;
import com.gic.enterprise.error.ErrorCode;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -29,6 +30,9 @@ public class UserController {
@RequestMapping("/save-or-update-user")
public RestResponse editUser(@Validated({ UserDTO.UserQoValid.class }) UserDTO userDTO) {
if (UserDetailUtils.getUserDetail().getUserInfo().getSuperAdmin().intValue() == 0) {
return RestResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "子管理员不能编辑");
}
Integer operationPassword = userDTO.getOperPasswordType();
userDTO.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
if (operationPassword != null && operationPassword.intValue() == 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment