bug 9245: save ownerAccountId (instead of callerAccountId) to account_id field in async_job table. We already save caller info to user_id field

status 9245: resolved fixed
This commit is contained in:
alena 2011-03-31 15:19:51 -07:00
parent 47eb018975
commit 2af8b32d31

View File

@ -408,14 +408,8 @@ public class ApiServer implements HttpRequestHandler {
job.setInstanceId((objectId == null) ? asyncCmd.getInstanceId() : objectId);
job.setInstanceType(asyncCmd.getInstanceType());
job.setUserId(userId);
if (account != null) {
job.setAccountId(ctx.getCaller().getId());
} else {
// Just have SYSTEM own the job for now. Users won't be able to see this job,
// but in an admin case (like domain admin) they won't be able to see it anyway
// so no loss of service.
job.setAccountId(1L);
}
job.setAccountId(asyncCmd.getEntityOwnerId());
job.setCmd(cmdObj.getClass().getName());
job.setCmdInfo(ApiGsonHelper.getBuilder().create().toJson(params));