Print 'key' in ReadOnlyAttributeUnchangedValidator failure log message
This change is quite useful for debugging and helps identify which specific attribute makes the update fail. Currently, the full pattern is printed which consists of multiple attributes.
This commit is contained in:
parent
7707efae57
commit
4f90124612
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ public class ReadOnlyAttributeUnchangedValidator implements SimpleValidator {
|
|||
}
|
||||
|
||||
if (!isUnchanged(existingValue, value)) {
|
||||
logger.warnf("Attempt to edit denied attribute '%s' of user '%s'", pattern, user == null ? "new user" : user.getFirstAttribute(UserModel.USERNAME));
|
||||
logger.warnf("Attempt to edit denied for attribute '%s' with pattern '%s' of user '%s'", key, pattern, user == null ? "new user" : user.getFirstAttribute(UserModel.USERNAME));
|
||||
context.addError(new ValidationError(ID, key, UPDATE_READ_ONLY_ATTRIBUTES_REJECTED_MSG));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue