mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +01:00
Respect "disabled" custom field status granted by "subtype" configuration in form validation
Summary: Fixes T13384. Currently, the subtype "disabled" configuration is not respected when selecting fields for `ROLE_EDIT`. The only meaningful caller for `ROLE_EDIT` is transaction validation, but transaction validation should respect fields being disabled by subtype configuration. Test Plan: - Added a "required" Maniphest custom field "F", then "disabled" it in a subtype "S". - Created a task of subtype "S". - Before: Form submission fails with error "F is required", even though the field is not actually visible on the form and can not be set. - After: Form submits cleanly and creates the task. Maniphest Tasks: T13384 Differential Revision: https://secure.phabricator.com/D20726
This commit is contained in:
parent
64b399d9be
commit
c439931373
1 changed files with 1 additions and 0 deletions
|
@ -1648,6 +1648,7 @@ abstract class PhabricatorCustomField extends Phobject {
|
||||||
$subtype_roles = array(
|
$subtype_roles = array(
|
||||||
self::ROLE_EDITENGINE,
|
self::ROLE_EDITENGINE,
|
||||||
self::ROLE_VIEW,
|
self::ROLE_VIEW,
|
||||||
|
self::ROLE_EDIT,
|
||||||
);
|
);
|
||||||
|
|
||||||
$subtype_roles = array_fuse($subtype_roles);
|
$subtype_roles = array_fuse($subtype_roles);
|
||||||
|
|
Loading…
Reference in a new issue