rename checkGlobalAccess method

This commit is contained in:
Yuri Kuznetsov
2014-04-30 14:04:52 +03:00
parent c9aeecc9f3
commit b5e644ef6f
7 changed files with 8 additions and 13 deletions

View File

@@ -27,7 +27,7 @@ use \Espo\Core\Exceptions\Error,
class Admin extends \Espo\Core\Controllers\Base
{
protected function checkGlobalAccess()
protected function checkControllerAccess()
{
if (!$this->getUser()->isAdmin()) {
throw new Forbidden();

View File

@@ -28,7 +28,7 @@ use \Espo\Core\Exceptions\Error,
class FieldManager extends \Espo\Core\Controllers\Base
{
protected function checkGlobalAccess()
protected function checkControllerAccess()
{
if (!$this->getUser()->isAdmin()) {
throw new Forbidden();

View File

@@ -24,7 +24,7 @@ namespace Espo\Controllers;
class ScheduledJob extends \Espo\Core\Controllers\Record
{
protected function checkGlobalAccess()
protected function checkControllerAccess()
{
if (!$this->getUser()->isAdmin()) {
throw new Forbidden();

View File

@@ -24,7 +24,7 @@ namespace Espo\Controllers;
class ScheduledJobLogRecord extends \Espo\Core\Controllers\Record
{
protected function checkGlobalAccess()
protected function checkControllerAccess()
{
if (!$this->getUser()->isAdmin()) {
throw new Forbidden();

View File

@@ -46,10 +46,10 @@ abstract class Base
$this->name = $name;
}
$this->checkGlobalAccess();
$this->checkControllerAccess();
}
protected function checkGlobalAccess()
protected function checkControllerAccess()
{
return;
}

View File

@@ -24,7 +24,7 @@ namespace Espo\Modules\Crm\Controllers;
class InboundEmail extends \Espo\Core\Controllers\Record
{
protected function checkGlobalAccess()
protected function checkControllerAccess()
{
if (!$this->getUser()->isAdmin()) {
throw new Forbidden();

View File

@@ -24,10 +24,5 @@ namespace Espo\Modules\Crm\Entities;
class InboundEmail extends \Espo\Core\ORM\Entity
{
protected function checkGlobalAccess()
{
if (!$this->getUser()->isAdmin()) {
throw new Forbidden();
}
}
}