bug 8954: only root admin can access console proxy, SSVM and DomR

This commit is contained in:
Kelven Yang 2011-03-23 14:46:34 -07:00
parent 342648244d
commit 1abbc007ba
1 changed files with 2 additions and 1 deletions

View File

@ -377,13 +377,13 @@ public class ConsoleProxyServlet extends HttpServlet {
return false;
}
// root admin can access anything
if(accountObj.getType() == Account.ACCOUNT_TYPE_ADMIN)
return true;
switch(vm.getType())
{
case User :
case DomainRouter:
if(vm.getAccountId() != accountObj.getId()) {
// access from another normal user
@ -407,6 +407,7 @@ public class ConsoleProxyServlet extends HttpServlet {
}
break;
case DomainRouter:
case ConsoleProxy :
case SecondaryStorageVm:
return false;