Skip to content

Commit

Permalink
modified exception thrown in the case of exp. date change for admin a…
Browse files Browse the repository at this point in the history
…ccount
  • Loading branch information
Agnul97 authored and Coduz committed Jan 13, 2023
1 parent 6c36f5a commit 445116e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public Account update(Account account) throws KapuaException {
//check if the updated account is an admin account
if (setting.getString(SystemSettingKey.SYS_ADMIN_ACCOUNT).equals(account.getName())) {
//throw exception if trying to set an expiration date for an admin account
throw new KapuaIllegalArgumentException("notAllowedExpirationDate", account.getExpirationDate().toString());
throw new KapuaAccountException(KapuaAccountErrorCodes.OPERATION_NOT_ALLOWED, null, "Admin account cannot have an expiration date set");
}
}

Expand Down

0 comments on commit 445116e

Please sign in to comment.