issue 2128, fixed a problem. Display 'system_message.html not found' message when run not permitted action.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3@10859 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2012-07-10 05:54:14 +00:00
parent c131aefc3e
commit ae60abc551

View file

@ -176,12 +176,15 @@
switch($permission_target) { switch($permission_target) {
case 'root' : case 'root' :
$this->stop('msg_not_permitted_act'); $this->stop('msg_not_permitted_act');
return;
break; break;
case 'manager' : case 'manager' :
if(!$grant->manager) $this->stop('msg_not_permitted_act'); if(!$grant->manager) $this->stop('msg_not_permitted_act');
return;
break; break;
case 'member' : case 'member' :
if(!$is_logged) $this->stop('msg_not_permitted_act'); if(!$is_logged) $this->stop('msg_not_permitted_act');
return;
break; break;
} }
} }
@ -335,7 +338,8 @@
if(isset($this->xml_info->action->{$this->act}) && method_exists($this, $this->act)) { if(isset($this->xml_info->action->{$this->act}) && method_exists($this, $this->act)) {
// Check permissions // Check permissions
if(!$this->grant->access){ if(!$this->grant->access){
return $this->stop("msg_not_permitted_act"); $this->stop("msg_not_permitted_act");
return FALSE;
} }
// integrate skin information of the module(change to sync skin info with the target module only by seperating its table) // integrate skin information of the module(change to sync skin info with the target module only by seperating its table)
$oModuleModel = &getModel('module'); $oModuleModel = &getModel('module');