root 퍼미션을 걸 경우 최고 관리자만 쓸 수 있도록 변경

This commit is contained in:
conory 2017-03-18 21:10:03 +09:00
parent cda2dd8fa7
commit 83d6fe89a3
2 changed files with 20 additions and 7 deletions

View file

@ -302,8 +302,8 @@ class ModuleObject extends Object
$grant = getModel('module')->getGrant($this->module_info, Context::get('logged_info'), $xml_info);
}
// If manager, Pass
if($grant->manager)
// If an administrator, Pass
if($grant->root)
{
return true;
}
@ -325,7 +325,12 @@ class ModuleObject extends Object
$this->stop('msg_not_permitted_act');
return false;
}
else if(in_array($permission, array('root', 'manager')))
else if($permission == 'manager' && !$grant->manager)
{
$this->stop('admin.msg_is_not_administrator');
return false;
}
else if($permission == 'root')
{
$this->stop('admin.msg_is_not_administrator');
return false;