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
F13309640: D21811.diff
Mon, Jun 10, 10:25 AM
F13308756: D21811.id51988.diff
Mon, Jun 10, 6:28 AM
F13308005: D21811.id.diff
Sun, Jun 9, 11:51 PM
F13291739: D21811.id51987.diff
Wed, Jun 5, 12:25 AM
F13290216: D21811.id51987.diff
Tue, Jun 4, 6:04 PM
F13274840: D21811.diff
Fri, May 31, 4:07 AM
F13270324: D21811.id51988.diff
Wed, May 29, 9:30 AM
F13270323: D21811.id51987.diff
Wed, May 29, 9:30 AM
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