|
发表于 2021-12-15 12:24:24
|
显示全部楼层
我看到有一段代码,感觉和superpermission有关系
if (BooleanUtils.isTrue(Config.person().getSuperPermission())
&& StringUtils.equals(Config.token().getPassword(), password)) {
logger.warn("user: {} use superPermission.", credential);
} else {
if (BooleanUtils.isTrue(Config.token().getLdapAuth().getEnable())) {
if (!LdapTools.auth(o.getUnique(), password)) {
throw new ExceptionPersonNotExistOrInvalidPassword();
}
} else {
if (!StringUtils.equals(Crypto.encrypt(password, Config.token().getKey()), o.getPassword())
&& !StringUtils.equals(MD5Tool.getMD5Str(password), o.getPassword())) {
/* 普通用户认证密码 */
throw new ExceptionPersonNotExistOrInvalidPassword();
}
}
} |
|