Scalr\Api\Rest\Controller\ApiController::checkPermissions PHP Méthode

checkPermissions() public méthode

checkPermissions(object $obj, bool $modify = false, $errorMessage='') checkPermissions(int $roleId, string $permissionId = null, $errorMessage='')
public checkPermissions ( $args )
    public function checkPermissions(...$args)
    {
        $this->app->checkPermissions(...$args);
    }

Usage Example

Exemple #1
0
 /**
  * Permissions won't check if object has environment scope and role Acl::RESOURCE_ANALYTICS_ACCOUNT
  * {@inheritdoc}
  * @see ApiController::checkPermissions()
  */
 public function checkPermissions(...$args)
 {
     if ($this->getScope() === ScopeInterface::SCOPE_ENVIRONMENT && isset($args[0]) && $args[0] == Acl::RESOURCE_ANALYTICS_ACCOUNT && empty($args[1])) {
         return;
     }
     parent::checkPermissions(...$args);
 }
All Usage Examples Of Scalr\Api\Rest\Controller\ApiController::checkPermissions