shwstppr commented on code in PR #9572:
URL: https://github.com/apache/cloudstack/pull/9572#discussion_r1728470369
##########
server/src/main/java/com/cloud/event/ActionEventUtils.java:
##########
@@ -393,7 +395,10 @@ private static void populateFirstClassEntities(Map<String,
String> eventDescript
s_logger.trace("Caught exception while populating first class
entities for event bus, moving on");
}
}
-
}
+ public static long getOwnerAccountId(CallContext ctx, String eventType,
long callingAccountId) {
+ long accountId = ctx.getProject() != null &&
!EventTypes.EVENT_PROJECT_CREATE.equalsIgnoreCase(eventType) ?
ctx.getProject().getProjectAccountId() : callingAccountId; //This should be
the entity owner id rather than the Calling User Account Id.
Review Comment:
What is the point of keeping `EVENT_PROJECT_CREATE` linked to caller?
Should EVENT_PROJECT_UPDATE/EVENT_PROJECT_DELETE also be linked to the
caller in the same way?
--
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]