Page MenuHomePhabricator

Correct overbroad automatic capability grant of global settings objects
ClosedPublic

Authored by epriestley on May 9 2022, 10:10 PM.
Tags
None
Referenced Files
F19071514: D21811.id51987.diff
Sun, Nov 30, 7:51 PM
F19057031: D21811.id51987.diff
Fri, Nov 28, 9:13 PM
F19023626: D21811.id51988.diff
Nov 24 2025, 1:08 AM
F19009476: D21811.id51988.diff
Nov 21 2025, 11:36 PM
F18855818: D21811.diff
Nov 1 2025, 6:54 AM
F18844926: D21811.id.diff
Oct 29 2025, 8:21 AM
F18842376: D21811.diff
Oct 28 2025, 3:27 PM
F18814198: D21811.diff
Oct 20 2025, 10:15 PM
Subscribers
None

Details

Summary

Ref T13679. In D16983, global settings objects were given an exception to let logged-out users see them, even on installs with no "public" user role.

This exception is too broad and grants everyone all capabilities, not just "CAN_VIEW". In particular, it incorrectly grants "CAN_EDIT", so any user can edit global settings defaults.

Restrict this grant to "CAN_VIEW".

Test Plan
  • As a non-administrator, tried to edit global settings.
  • Before: could.
  • After: could not.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable