mirror of https://gitee.com/topiam/eiam
✨ 优化暂未配置存储提供商提示
parent
cb0104eb22
commit
e229b1a723
|
@ -39,11 +39,11 @@ public class NoneStorage extends AbstractStorage {
|
|||
@Override
|
||||
public String upload(@NotNull String fileName,
|
||||
InputStream inputStream) throws StorageProviderException {
|
||||
throw new StorageProviderException("暂未配置存储提供商,请联系管理员");
|
||||
throw new StorageProviderException("暂未配置存储提供商");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String download(String path) throws StorageProviderException {
|
||||
throw new StorageProviderException("暂未配置存储提供商,请联系管理员");
|
||||
throw new StorageProviderException("暂未配置存储提供商");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,19 +40,19 @@ import jakarta.validation.constraints.NotNull;
|
|||
public class ChangePasswordRequest implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 5681761697876754485L;
|
||||
private static final long serialVersionUID = 5681761697876754485L;
|
||||
|
||||
/**
|
||||
* 新密码
|
||||
*/
|
||||
@NotEmpty(message = "新密码不能为空")
|
||||
@Parameter(description = "新密码")
|
||||
private String newPassword;
|
||||
private String newPassword;
|
||||
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
@NotEmpty(message = "旧密码不能为空")
|
||||
@Parameter(description = "旧密码")
|
||||
private String oldPassword;
|
||||
private String oldPassword;
|
||||
}
|
||||
|
|
|
@ -98,8 +98,9 @@ public class UserProfileServiceImpl implements UserProfileService {
|
|||
//获取用户
|
||||
AdministratorEntity administrator = getCurrentUser();
|
||||
//校验旧密码
|
||||
if (!passwordEncoder.matches(param.getOldPassword(),administrator.getPassword())){
|
||||
logger.error("用户ID: [{}] 用户名: [{}] 修改密码失败,原密码错误",administrator.getId(),administrator.getUsername());
|
||||
if (!passwordEncoder.matches(param.getOldPassword(), administrator.getPassword())) {
|
||||
logger.error("用户ID: [{}] 用户名: [{}] 修改密码失败,原密码错误", administrator.getId(),
|
||||
administrator.getUsername());
|
||||
throw new PasswordValidatedFailException("旧密码错误");
|
||||
}
|
||||
//修改密码
|
||||
|
|
Loading…
Reference in New Issue