change the assumptions for who can view the list of workspaces

Created on 10 July 2025, 5 days ago

Problem/Motivation

As discussed with @amateescu on slack https://drupal.slack.com/archives/CK8D2C0VB/p1752118289647129
The assumptions for who can view the list of workspaces is 'view own workspace+administer workspaces+edit any workspace' in core/modules/workspaces/workspaces.routing.yml. So a role wanting to work with the permission view own permission leads to the error The following permissions are required: 'view any workspace' OR 'administer workspaces' OR 'edit any workspace'

Steps to reproduce

  1. Install drupal with standard profile
  2. Enable workspaces
  3. Set permissions for a user of any role to use only `view own workspace`
  4. Create a workspace using admin and assign to the the other role
  5. Log in and try to switch to the assigned workspace

Proposed resolution

Set the permission assumption for entity.workspace.collection in core/modules/workspaces/workspaces.routing.yml from _permission: 'view any workspace+administer workspaces+edit any workspace' to _permission: 'view own workspace+view any workspace+administer workspaces+edit any workspace'

Remaining tasks

Update the list builder to show only those workspaces which are assigned to the user role

🐛 Bug report
Status

Active

Version

11.2 🔥

Component

workspaces.module

Created by

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

Comments & Activities

Production build 0.71.5 2024