/** * Check authorization. * * @return bool */ protected function authorize() { return $this->acl->canIf('manage orchestra'); }
/** * 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'); }
/** * 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'); }
/** * Check authorization to display the menu. * * @param \Orchestra\Contracts\Authorization\Authorization $acl * * @return bool */ public function authorize(Authorization $acl) { return $acl->canIf('manage-users'); }
/** * 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']); }
/** * Resolve if authorization can if action exists. * * @param string $action * * @return bool */ protected function canIf($action) { return $this->acl->canIf($action); }