Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13980858
D14812.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D14812.diff
View Options
diff --git a/src/applications/policy/editor/PhabricatorPolicyEditEngineExtension.php b/src/applications/policy/editor/PhabricatorPolicyEditEngineExtension.php
--- a/src/applications/policy/editor/PhabricatorPolicyEditEngineExtension.php
+++ b/src/applications/policy/editor/PhabricatorPolicyEditEngineExtension.php
@@ -101,6 +101,7 @@
->setLabel(pht('Space'))
->setEditTypeKey('space')
->setIsCopyable(true)
+ ->setIsLockable(false)
->setIsReorderable(false)
->setAliases(array('space', 'policy.space'))
->setTransactionType($type_space)
@@ -111,6 +112,7 @@
->setValue($object->getSpacePHID());
$fields[] = $space_field;
+ $space_field->setPolicyField($policy_field);
$policy_field->setSpaceField($space_field);
}
}
diff --git a/src/applications/transactions/editfield/PhabricatorSpaceEditField.php b/src/applications/transactions/editfield/PhabricatorSpaceEditField.php
--- a/src/applications/transactions/editfield/PhabricatorSpaceEditField.php
+++ b/src/applications/transactions/editfield/PhabricatorSpaceEditField.php
@@ -3,6 +3,17 @@
final class PhabricatorSpaceEditField
extends PhabricatorEditField {
+ private $policyField;
+
+ public function setPolicyField(PhabricatorPolicyEditField $policy_field) {
+ $this->policyField = $policy_field;
+ return $this;
+ }
+
+ public function getPolicyField() {
+ return $this->policyField;
+ }
+
protected function newControl() {
// NOTE: This field doesn't do anything on its own, it just serves as a
// companion to the associated View Policy field.
@@ -17,4 +28,13 @@
return new ConduitPHIDParameterType();
}
+
+ public function shouldReadValueFromRequest() {
+ return $this->getPolicyField()->shouldReadValueFromRequest();
+ }
+
+ public function shouldReadValueFromSubmit() {
+ return $this->getPolicyField()->shouldReadValueFromSubmit();
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 20, 12:56 PM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6736488
Default Alt Text
D14812.diff (1 KB)
Attached To
Mode
D14812: Prevent "Spaces" field from being set to inconsistent values
Attached
Detach File
Event Timeline
Log In to Comment