Page MenuHomePhabricator

Fix control state for custom application policies with template types
ClosedPublic

Authored by epriestley on Oct 20 2015, 1:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 8:26 AM
Unknown Object (File)
Mon, Apr 8, 10:45 PM
Unknown Object (File)
Tue, Apr 2, 9:37 PM
Unknown Object (File)
Sun, Mar 31, 7:20 PM
Unknown Object (File)
Mar 13 2024, 12:44 PM
Unknown Object (File)
Feb 3 2024, 6:53 AM
Unknown Object (File)
Jan 26 2024, 10:27 PM
Unknown Object (File)
Dec 27 2023, 7:14 AM
Subscribers
None

Details

Summary

Fixes T9118. When populating some policy controls like "Default Can View" for repositories, we do some special logic to add object policies which are valid for the target object type.

For example, it's OK to set the default policy for an object which has subscribers to "Subscribers".

However, this logic incorrectly removed custom policies, so the form input ended up blank.

Instead, provide both object policies and custom policies.

Test Plan
  • Set default view policy to a custom policy.
  • Hit "Edit" again, saw control correctly reflect custom policy after change.
  • Set default edit policy to a different custom policy.
  • Saved, edited, verified both policies stuck.
  • Set both policies back.
  • Checked some other object types to make sure object policies still work properly.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Fix control state for custom application policies with template types.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Oct 20 2015, 1:55 PM
This revision was automatically updated to reflect the committed changes.