mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-27 22:46:04 +00:00
controllers refactoring
This commit is contained in:
@@ -31,46 +31,21 @@ namespace Espo\Controllers;
|
||||
|
||||
use Espo\Core\Exceptions\Forbidden;
|
||||
|
||||
class Job extends \Espo\Core\Controllers\Record
|
||||
use Espo\Core\Controllers\RecordBase;
|
||||
|
||||
class Job extends RecordBase
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
protected function checkAccess(): bool
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
return $this->getUser()->isAdmin();
|
||||
}
|
||||
|
||||
public function beforeCreate()
|
||||
public function beforeCreate(): void
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforeUpdate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforePatch()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforeListLinked()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforeMassUpdate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforeCreateLink()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforeRemoveLink()
|
||||
public function beforeUpdate(): void
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user