Homec4science

Fix control state for custom application policies with template types

Authored by epriestley <git@epriestley.com> on Oct 20 2015, 15:56.

Description

Fix control state for custom application policies with template types

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.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9118

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

Details

Committed
epriestley <git@epriestley.com>Oct 20 2015, 15:56
Pushed
aubortJan 31 2017, 17:16
Parents
rPHbbbda23678dd: In PHUIInfoView, only show list UI if more than 1 item
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH22b9b76079be: Fix control state for custom application policies with template types (authored by epriestley <git@epriestley.com>).Oct 20 2015, 15:56