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
Unknown Object (File)
Sun, Jul 21, 3:48 AM
Unknown Object (File)
Wed, Jul 17, 1:18 AM
Unknown Object (File)
Fri, Jul 12, 10:25 PM
Unknown Object (File)
Sun, Jul 7, 9:43 PM
Unknown Object (File)
Sat, Jul 6, 5:44 PM
Unknown Object (File)
Fri, Jul 5, 12:17 AM
Unknown Object (File)
Wed, Jul 3, 6:28 PM
Unknown Object (File)
Thu, Jun 27, 4:12 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