Damans227 commented on code in PR #14346:
URL: https://github.com/apache/cloudstack/pull/14346#discussion_r4211052344


##########
server/src/main/java/com/cloud/network/vpc/VpcManagerImpl.java:
##########
@@ -2851,7 +2851,7 @@ protected boolean deletePrivateGatewayFromTheDB(final 
PrivateGateway gateway) {
             if (deleteNetworkFinal) {
                 final User callerUser = 
_accountMgr.getActiveUser(CallContext.current().getCallingUserId());
                 final Account owner = 
_accountMgr.getAccount(Account.ACCOUNT_ID_SYSTEM);
-                final ReservationContext context = new 
ReservationContextImpl(null, null, callerUser, owner);
+                final ReservationContext context = new 
ReservationContextImpl(null, null, callerUser, 
CallContext.current().getCallingAccount());

Review Comment:
   any reason to change this one too? it already used the system account so it 
never hit the disabled account problem, and now a normal user deleting the 
gateway could fail the permission checks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to