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
F13989973: D14310.diff
Tue, Oct 22, 12:14 AM
F13987756: D14310.id34542.diff
Mon, Oct 21, 11:08 AM
F13983049: D14310.id34541.diff
Oct 20 2024, 3:47 AM
F13978229: D14310.diff
Oct 18 2024, 10:13 PM
F13978221: D14310.id.diff
Oct 18 2024, 10:11 PM
F13978216: D14310.id34541.diff
Oct 18 2024, 10:10 PM
F13978211: D14310.id34542.diff
Oct 18 2024, 10:08 PM
Unknown Object (File)
Oct 2 2024, 4:37 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.