nitin-maharana commented on a change in pull request #2574: [CLOUDSTACK-5235] 
ask users current password when they are executing a password update
URL: https://github.com/apache/cloudstack/pull/2574#discussion_r185181516
 
 

 ##########
 File path: server/src/main/java/com/cloud/user/AccountManagerImpl.java
 ##########
 @@ -1633,16 +1720,16 @@ public AccountVO updateAccount(UpdateAccountCmd cmd) {
         }
 
         // Check if user performing the action is allowed to modify this 
account
-        checkAccess(CallContext.current().getCallingAccount(), 
_domainMgr.getDomain(account.getDomainId()));
+        checkAccess(getCurrentCallingAccount(), 
_domainMgr.getDomain(account.getDomainId()));
 
         // check if the given account name is unique in this domain for 
updating
         Account duplicateAcccount = 
_accountDao.findActiveAccount(newAccountName, domainId);
         if (duplicateAcccount != null && duplicateAcccount.getId() != 
account.getId()) {// allow
-                                                                               
         // same
-                                                                               
         // account
-                                                                               
         // to
-                                                                               
         // update
-                                                                               
         // itself
+            // same
 
 Review comment:
   Would be better if we combine all the words in a single line.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to