bug 7114: Fix NPE for updateTemplatePermissions when accessed via 8096. This was happening due to accountObj being null in User Context when accessed via 8096. Why we set it to null seems to be a hack to me.

status 7114: resolved fixed
This commit is contained in:
nit 2010-11-09 20:01:13 +05:30
parent 351f98ceef
commit 3455a0f563
1 changed files with 2 additions and 1 deletions

View File

@ -4012,7 +4012,8 @@ public class ManagementServerImpl implements ManagementServer {
_templateDao.update(template.getId(), updatedTemplate);
Long domainId = account.getDomainId();
Long domainId;
domainId = (null == account) ? DomainVO.ROOT_DOMAIN : account.getDomainId(); // Account == null for 8096 and so its safe for domainid = ROOT
if ("add".equalsIgnoreCase(operation)) {
txn.start();
for (String accountName : accountNames) {