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
F19770035: D21811.diff
Thu, Feb 19, 8:30 PM
F19702334: D21811.diff
Wed, Feb 11, 12:10 AM
F19535797: D21811.id51987.diff
Jan 21 2026, 8:26 AM
F19529626: D21811.diff
Jan 19 2026, 5:38 PM
F19529619: D21811.diff
Jan 19 2026, 5:33 PM
F19529120: D21811.id51988.diff
Jan 19 2026, 2:22 PM
F19526492: D21811.diff
Jan 18 2026, 5:35 PM
F19526483: D21811.diff
Jan 18 2026, 5:30 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