return new Status(StatusCode.BADREQUEST,
"Current password is incorrect");
}
return new Status(StatusCode.BADREQUEST,
"Current password is incorrect");
}
// Create a new object with the proposed modifications
UserConfig proposed = new UserConfig();
proposed.user = this.user;
proposed.password = (newPassword != null)? newPassword : this.password;
proposed.roles = (newRoles != null)? newRoles : this.roles;
// Create a new object with the proposed modifications
UserConfig proposed = new UserConfig();
proposed.user = this.user;
proposed.password = (newPassword != null)? newPassword : this.password;
proposed.roles = (newRoles != null)? newRoles : this.roles;
// Accept the modifications
this.user = proposed.user;
this.password = proposed.password;
this.roles = new ArrayList<String>(proposed.roles);
// Accept the modifications
this.user = proposed.user;
this.password = proposed.password;
this.roles = new ArrayList<String>(proposed.roles);