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
F13133764: D14310.diff
Wed, May 1, 11:23 PM
Unknown Object (File)
Thu, Apr 25, 12:09 AM
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)
Mar 31 2024, 7:20 PM
Unknown Object (File)
Mar 13 2024, 12:44 PM
Unknown Object (File)
Feb 3 2024, 6:53 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
Branch
pol1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 8353
Build 9585: Run Core Tests
Build 9584: arc lint + arc unit

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.