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)
Sat, Dec 14, 10:13 AM
Unknown Object (File)
Thu, Dec 5, 5:49 AM
Unknown Object (File)
Oct 22 2024, 12:14 AM
Unknown Object (File)
Oct 21 2024, 11:08 AM
Unknown Object (File)
Oct 20 2024, 3:47 AM
Unknown Object (File)
Oct 18 2024, 10:13 PM
Unknown Object (File)
Oct 18 2024, 10:11 PM
Unknown Object (File)
Oct 18 2024, 10:10 PM
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.