Skip to content

feat: gate where people are behind a per-user view_presence_location meta cap - #571

Merged
josephfusco merged 4 commits into
mainfrom
feat/whos-online-location-list-users
Sep 27, 2026
Merged

josephfusco merged 4 commits into
mainfrom
feat/whos-online-location-list-users

Conversation

@josephfusco

@josephfusco josephfusco commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

view_presence_location is a per-user meta cap like edit_user, mapped to nothing for yourself and list_users for anyone else so no role needs upgrading, which means editors on single sites stop seeing other people's locations in Who's Online, the admin bar and the REST admin/online response alike.

Fixes #570

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Assisting with the change and its tests.

@github-actions

Copy link
Copy Markdown
Contributor

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props joefusco.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🛝 WordPress Playgrounds

Built from 4648979

5 users 40 users
Single site Launch single site, 5 users Launch single site, 40 users
Multisite Launch multisite, 5 users Launch multisite, 40 users

@codecov

codecov Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.97%. Comparing base (423f9ba) to head (4648979).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #571      +/-   ##
============================================
- Coverage     95.98%   95.97%   -0.02%     
+ Complexity      260      259       -1     
============================================
  Files            25       25              
  Lines          3264     3277      +13     
============================================
+ Hits           3133     3145      +12     
- Misses          131      132       +1     
Flag Coverage Δ
multisite 95.97% <100.00%> (-0.02%) ⬇️
phpunit 72.62% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@josephfusco josephfusco added [Type] Enhancement A suggestion for improvement of an existing feature [Area] Widgets Issues for the dashboard widgets php Pull requests that update php code labels Sep 27, 2026
@josephfusco
josephfusco force-pushed the feat/whos-online-location-list-users branch from ead8941 to bfdfe5a Compare September 27, 2026 00:28
@josephfusco josephfusco changed the title feat: show where people are in Who's Online only to users who can list users feat: gate where people are behind a view_presence_locations meta cap Sep 27, 2026
@josephfusco josephfusco added [Area] REST API Issues for the REST API subsystem Public API Adds a hook, route, constant, or global that third parties can depend on labels Sep 27, 2026
@github-actions github-actions Bot removed the Public API Adds a hook, route, constant, or global that third parties can depend on label Sep 27, 2026
github-actions Bot added a commit that referenced this pull request Sep 27, 2026
@josephfusco josephfusco changed the title feat: gate where people are behind a view_presence_locations meta cap feat: gate where people are behind a per-user view_presence_location meta cap Sep 27, 2026
github-actions Bot added a commit that referenced this pull request Sep 27, 2026
github-actions Bot added a commit that referenced this pull request Sep 27, 2026
@josephfusco
josephfusco force-pushed the feat/whos-online-location-list-users branch from 8c59111 to 4648979 Compare September 27, 2026 00:39
github-actions Bot added a commit that referenced this pull request Sep 27, 2026
@josephfusco
josephfusco merged commit 5c5a264 into main Sep 27, 2026
21 checks passed
@josephfusco
josephfusco deleted the feat/whos-online-location-list-users branch September 27, 2026 00:57
@josephfusco josephfusco added this to the 0.9.0 milestone Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] REST API Issues for the REST API subsystem [Area] Widgets Issues for the dashboard widgets php Pull requests that update php code [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Who's Online widget shows where everyone is to users who cannot list users

1 participant