Allow switching to any workspace in CLI requests

Created on 23 November 2022, about 2 years ago
Updated 7 March 2023, almost 2 years ago

Problem/Motivation

CLI requests can't use WorkspaceManager::executeInWorkspace() because doSwitchWorkspace() checks whether the current user has access to view the workspace.

Steps to reproduce

- create a workspace with the ID test
- try to run this:

drush php-eval "\Drupal::service('workspaces.manager')->executeInWorkspace('test', function () {return TRUE;});"

Proposed resolution

Exclude CLI processes when checking for workspace view access in WorkspaceManager::doSwitchWorkspace().

Remaining tasks

Review.

User interface changes

Nope.

API changes

Nope.

Data model changes

Nope.

Release notes snippet

Nope.

πŸ› Bug report
Status

Fixed

Version

9.5

Component
WorkspacesΒ  β†’

Last updated about 18 hours ago

No maintainer
Created by

πŸ‡·πŸ‡΄Romania amateescu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024