Exemplo n.º 1
0
 /**
  * Check authorization.
  *
  * @return bool
  */
 protected function authorize()
 {
     return $this->acl->canIf('manage orchestra');
 }
Exemplo n.º 2
0
 /**
  * Check whether the menu should be displayed.
  *
  * @param  \Orchestra\Contracts\Authorization\Authorization  $acl
  *
  * @return bool
  */
 public function authorize(Authorization $acl)
 {
     return $acl->can('manage roles') || $acl->can('manage acl');
 }
 /**
  * Check authorization to display the menu.
  *
  * @param  \Orchestra\Contracts\Authorization\Authorization  $acl
  *
  * @return bool
  */
 public function authorize(Authorization $acl)
 {
     return $this->container->bound('orchestra.extension') && $acl->canIf('manage-orchestra');
 }
Exemplo n.º 4
0
 /**
  * Check whether the menu should be displayed.
  *
  * @param  \Orchestra\Contracts\Authorization\Authorization $acl
  *
  * @return bool
  */
 public function authorize(Authorization $acl)
 {
     return $acl->can('manage-orchestra');
 }
Exemplo n.º 5
0
 /**
  * Check authorization to display the menu.
  *
  * @param  \Orchestra\Contracts\Authorization\Authorization  $acl
  *
  * @return bool
  */
 public function authorize(Authorization $acl)
 {
     return $acl->canIf('manage-users');
 }
Exemplo n.º 6
0
 /**
  * Re-sync administrator access control.
  *
  * @return void
  */
 public function handle()
 {
     $admin = $this->app->make('orchestra.role')->admin();
     $this->acl->allow($admin->name, ['Manage Users', 'Manage Orchestra', 'Manage Roles', 'Manage Acl']);
 }
Exemplo n.º 7
0
 /**
  * Resolve if authorization can if action exists.
  *
  * @param  string  $action
  *
  * @return bool
  */
 protected function canIf($action)
 {
     return $this->acl->canIf($action);
 }