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
F14755351: D21811.id51987.diff
Tue, Jan 21, 4:00 PM
Unknown Object (File)
Tue, Jan 21, 12:54 PM
Unknown Object (File)
Tue, Jan 21, 9:39 AM
Unknown Object (File)
Mon, Jan 20, 4:21 PM
Unknown Object (File)
Wed, Jan 15, 9:16 AM
Unknown Object (File)
Thu, Jan 9, 12:52 AM
Unknown Object (File)
Fri, Jan 3, 2:20 PM
Unknown Object (File)
Tue, Dec 31, 4:06 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