From 6e089ca99c5fdb8b2aa8f5fea82831469079629f Mon Sep 17 00:00:00 2001 From: nit Date: Mon, 17 Jan 2011 14:15:15 +0530 Subject: [PATCH] bug 8031 : Allowing user to create his/her own private template that was created from the user's VM. status 8031 : resolved fixed --- server/src/com/cloud/acl/DomainChecker.java | 2 +- server/src/com/cloud/configuration/Config.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 server/src/com/cloud/acl/DomainChecker.java diff --git a/server/src/com/cloud/acl/DomainChecker.java b/server/src/com/cloud/acl/DomainChecker.java old mode 100644 new mode 100755 index 7742afb02af..720e44a226d --- a/server/src/com/cloud/acl/DomainChecker.java +++ b/server/src/com/cloud/acl/DomainChecker.java @@ -78,7 +78,7 @@ public class DomainChecker extends AdapterBase implements SecurityChecker { // validate that the template is usable by the account if (!template.isPublicTemplate()) { Account owner = _accountDao.findById(template.getAccountId()); - if (BaseCmd.isAdmin(owner.getType()) || (owner.getId() != account.getId())) { + if (BaseCmd.isAdmin(owner.getType()) || (owner.getId() == account.getId())) { return true; } diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java index ec2a5a4b7f3..42c563f1253 100755 --- a/server/src/com/cloud/configuration/Config.java +++ b/server/src/com/cloud/configuration/Config.java @@ -165,7 +165,7 @@ public enum Config { NetworkGcWait("Advanced", ManagementServer.class, Integer.class, "network.gc.wait", "600", "Seconds to wait before shutting down a network that's not in used", null), NetworkGcInterval("Advanced", ManagementServer.class, Integer.class, "network.gc.interval", "600", "Seconds to wait before checking for networks to shutdown", null), HostCapacityCheckerWait("Advanced", ManagementServer.class, Integer.class, "host.capacity.checker.wait", "3600", "Seconds to wait before starting host capacity background checker", null), - HostCapacityCheckerInterval("Advanced", ManagementServer.class, Integer.class, "host.capacity.checker.interval", "3600", "Seconds to wait before starting host capacity background checker", null), + HostCapacityCheckerInterval("Advanced", ManagementServer.class, Integer.class, "host.capacity.checker.interval", "3600", "Seconds to wait before recalculating host's capacity", null), VmHostCapacityReleaseInterval("Advanced", ManagementServer.class, Integer.class, "vm.resource.release.interval", "86400", "Seconds to wait before release VM's cpu and memory when VM in stopped state", null), VmTransitionWaitInterval("Advanced", ManagementServer.class, Integer.class, "vm.tranisition.wait.interval", "3600", "Seconds to wait before taking over a VM in transition state", null),