Homec4science

Treat invalid policies as broadly similar to "no one"

Authored by epriestley <git@epriestley.com> on Oct 1 2013, 20:25.

Description

Treat invalid policies as broadly similar to "no one"

Summary:
Ref T3903. Ref T603. We currently overreact to invalid policies. Instead:

  • For non-omnipotent users, just reject the viewer.
  • For omnipotent users, we already shortcircuit and permit the viewer.
  • Formalize and add test coverage for these behaviors.

Also clean up some strings.

The practical effect of this is that setting an object to an invalid policy (either intentionally or accidentally) doesn't break callers who are querying it.

Test Plan:

  • Created a Legalpad document and set view policy to "asldkfnaslkdfna".
  • Verified this policy behaved as though it were "no one".
  • Added, executed unit tests.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603, T3903

Differential Revision: https://secure.phabricator.com/D7185

Details

Committed
epriestley <git@epriestley.com>Oct 1 2013, 20:25
Pushed
aubortJan 31 2017, 17:16
Parents
rPHca85c457ebcb: Fix an issue where email is overquoted when attaching objects
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH4dfdd0d3167d: Treat invalid policies as broadly similar to "no one" (authored by epriestley <git@epriestley.com>).Oct 1 2013, 20:25