Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15470172
D14128.id34128.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D14128.id34128.diff
View Options
diff --git a/src/applications/diffusion/controller/DiffusionRepositoryEditMainController.php b/src/applications/diffusion/controller/DiffusionRepositoryEditMainController.php
--- a/src/applications/diffusion/controller/DiffusionRepositoryEditMainController.php
+++ b/src/applications/diffusion/controller/DiffusionRepositoryEditMainController.php
@@ -377,7 +377,7 @@
$repository);
$view_parts = array();
- if (PhabricatorSpacesNamespaceQuery::getViewerSpacesExist($viewer)) {
+ if (PhabricatorSpacesNamespaceQuery::getViewerActiveSpacesExist($viewer)) {
$space_phid = PhabricatorSpacesNamespaceQuery::getObjectSpacePHID(
$repository);
$view_parts[] = $viewer->renderHandle($space_phid);
diff --git a/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php b/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php
--- a/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php
+++ b/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php
@@ -239,7 +239,7 @@
->setValue($v_email)
->setError($e_email));
- if (PhabricatorSpacesNamespaceQuery::getViewerSpacesExist($viewer)) {
+ if (PhabricatorSpacesNamespaceQuery::getViewerActiveSpacesExist($viewer)) {
$form->appendControl(
id(new AphrontFormSelectControl())
->setLabel(pht('Space'))
@@ -395,7 +395,7 @@
$table->setRowClasses($rowc);
$table->setColumnVisibility(
array(
- PhabricatorSpacesNamespaceQuery::getViewerSpacesExist($viewer),
+ PhabricatorSpacesNamespaceQuery::getViewerActiveSpacesExist($viewer),
true,
$is_edit,
$is_edit,
diff --git a/src/applications/spaces/query/PhabricatorSpacesNamespaceQuery.php b/src/applications/spaces/query/PhabricatorSpacesNamespaceQuery.php
--- a/src/applications/spaces/query/PhabricatorSpacesNamespaceQuery.php
+++ b/src/applications/spaces/query/PhabricatorSpacesNamespaceQuery.php
@@ -103,6 +103,17 @@
return (count($spaces) > 1);
}
+ public static function getViewerActiveSpacesExist(PhabricatorUser $viewer) {
+ if (!self::getSpacesExist()) {
+ return false;
+ }
+
+ // If the viewer has access to only one active space, pretend active spaces
+ // simply don't exist.
+ $spaces = self::getViewerActiveSpaces($viewer);
+ return (count($spaces) > 1);
+ }
+
public static function getAllSpaces() {
$cache = PhabricatorCaches::getRequestCache();
$cache_key = self::KEY_ALL;
diff --git a/src/view/form/control/AphrontFormPolicyControl.php b/src/view/form/control/AphrontFormPolicyControl.php
--- a/src/view/form/control/AphrontFormPolicyControl.php
+++ b/src/view/form/control/AphrontFormPolicyControl.php
@@ -335,7 +335,7 @@
}
$viewer = $this->getUser();
- if (!PhabricatorSpacesNamespaceQuery::getViewerSpacesExist($viewer)) {
+ if (!PhabricatorSpacesNamespaceQuery::getViewerActiveSpacesExist($viewer)) {
return null;
}
diff --git a/webroot/rsrc/js/application/maniphest/behavior-batch-editor.js b/webroot/rsrc/js/application/maniphest/behavior-batch-editor.js
--- a/webroot/rsrc/js/application/maniphest/behavior-batch-editor.js
+++ b/webroot/rsrc/js/application/maniphest/behavior-batch-editor.js
@@ -25,7 +25,7 @@
'assign': 'Assign',
'add_ccs' : 'Add CCs',
'remove_ccs' : 'Remove CCs',
- 'space': 'Shift to Space'
+ 'space': 'Shift to Space' // TODO : ask !core how to properly mask this
});
var proj_tokenizer = build_tokenizer(config.sources.project);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 5, 8:57 PM (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7709651
Default Alt Text
D14128.id34128.diff (3 KB)
Attached To
Mode
D14128: [WIP] Masking space when only one active space
Attached
Detach File
Event Timeline
Log In to Comment