This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch 
655-support-change-of-username-and-password-in-profile-view
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to 
refs/heads/655-support-change-of-username-and-password-in-profile-view by this 
push:
     new b20ff202b Fetch principalId instead of username when changing user 
password (#655)
b20ff202b is described below

commit b20ff202bf9793c69dd9e1f0b9159bd43b8733ba
Author: Dominik Riemer <[email protected]>
AuthorDate: Fri May 5 14:26:05 2023 +0200

    Fetch principalId instead of username when changing user password (#655)
---
 .../src/main/java/org/apache/streampipes/rest/impl/UserResource.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/UserResource.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/UserResource.java
index ab6c53129..c4ae10da1 100644
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/UserResource.java
+++ 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/UserResource.java
@@ -252,7 +252,7 @@ public class UserResource extends 
AbstractAuthGuardedRestResource {
   @Produces(MediaType.APPLICATION_JSON)
   public Response updatePassword(@PathParam("principalId") String principalId,
                                  ChangePasswordRequest passwordRequest) {
-    String authenticatedUserId = getAuthenticatedUsername();
+    String authenticatedUserId = getAuthenticatedUserSid();
     UserAccount existingUser = (UserAccount) getPrincipalById(principalId);
     if (principalId.equals(authenticatedUserId) || isAdmin()) {
       try {

Reply via email to