bug 8031 : Allowing user to create his/her own private template that was created from the user's VM.

status 8031 : resolved fixed
This commit is contained in:
nit 2011-01-17 14:15:15 +05:30
parent e512413f06
commit 6e089ca99c
2 changed files with 2 additions and 2 deletions

2
server/src/com/cloud/acl/DomainChecker.java Normal file → Executable file
View File

@ -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;
}

View File

@ -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),