From 9623f9b5cf8a106fe8a680243117834ca5997aeb Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 2 Jul 2015 14:24:00 -0700 Subject: [PATCH 1/8] Allow unit test duration to be submitted as a float or an int Summary: Fixes T8736. It's OK for duration to be something that comes out of JSON as an int, like `1`. Test Plan: Will make @hach-que verify. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley, hach-que Maniphest Tasks: T8736 Differential Revision: https://secure.phabricator.com/D13531 --- .../storage/build/HarbormasterBuildUnitMessage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/harbormaster/storage/build/HarbormasterBuildUnitMessage.php b/src/applications/harbormaster/storage/build/HarbormasterBuildUnitMessage.php index 4e0e214961..2b9108b035 100644 --- a/src/applications/harbormaster/storage/build/HarbormasterBuildUnitMessage.php +++ b/src/applications/harbormaster/storage/build/HarbormasterBuildUnitMessage.php @@ -30,7 +30,7 @@ final class HarbormasterBuildUnitMessage 'namespace' => 'optional string', 'name' => 'string', 'result' => 'string', - 'duration' => 'optional float', + 'duration' => 'optional float|int', 'path' => 'optional string', 'coverage' => 'optional map', ); @@ -44,7 +44,7 @@ final class HarbormasterBuildUnitMessage $obj->setNamespace(idx($dict, 'namespace', '')); $obj->setName($dict['name']); $obj->setResult($dict['result']); - $obj->setDuration(idx($dict, 'duration')); + $obj->setDuration((float)idx($dict, 'duration')); $path = idx($dict, 'path'); if (strlen($path)) { From 5ce433074c971b47249b2e0d1031fccb97c8c1fe Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 2 Jul 2015 14:24:07 -0700 Subject: [PATCH 2/8] Fix a couple of minor Nuance / transaction publisher issues Summary: I got a couple of tasks stuck in my local queue a while ago when touching Nuance, fix a couple minor issues to clean them up. Test Plan: Ran tasks in queue, got clean results. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D13532 --- src/__phutil_library_map__.php | 1 + .../nuance/query/NuanceRequestorQuery.php | 33 +++++++------------ .../nuance/storage/NuanceItem.php | 27 ++++++++++++++- 3 files changed, 39 insertions(+), 22 deletions(-) diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index e4c1d337e6..23d2562822 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -4663,6 +4663,7 @@ phutil_register_library_map(array( 'NuanceItem' => array( 'NuanceDAO', 'PhabricatorPolicyInterface', + 'PhabricatorApplicationTransactionInterface', ), 'NuanceItemEditController' => 'NuanceController', 'NuanceItemEditor' => 'PhabricatorApplicationTransactionEditor', diff --git a/src/applications/nuance/query/NuanceRequestorQuery.php b/src/applications/nuance/query/NuanceRequestorQuery.php index 91a9878b83..49e4e61e94 100644 --- a/src/applications/nuance/query/NuanceRequestorQuery.php +++ b/src/applications/nuance/query/NuanceRequestorQuery.php @@ -16,41 +16,32 @@ final class NuanceRequestorQuery return $this; } - protected function loadPage() { - $table = new NuanceRequestor(); - $conn_r = $table->establishConnection('r'); - - $data = queryfx_all( - $conn_r, - 'SELECT FROM %T %Q %Q %Q', - $table->getTableName(), - $this->buildWhereClause($conn_r), - $this->buildOrderClause($conn_r), - $this->buildLimitClause($conn_r)); - - return $table->loadAllFromArray($data); + public function newObject() { + return new NuanceRequestor(); } - protected function buildWhereClause(AphrontDatabaseConnection $conn_r) { - $where = array(); + protected function loadPage() { + return $this->loadStandardPage($this->newObject()); + } - $where[] = $this->buildPagingClause($conn_r); + protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { + $where = parent::buildWhereClauseParts($conn); - if ($this->ids) { + if ($this->ids !== null) { $where[] = qsprintf( - $conn_r, + $conn, 'id IN (%Ld)', $this->ids); } - if ($this->phids) { + if ($this->phids !== null) { $where[] = qsprintf( - $conn_r, + $conn, 'phid IN (%Ls)', $this->phids); } - return $this->formatWhereClause($where); + return $where; } } diff --git a/src/applications/nuance/storage/NuanceItem.php b/src/applications/nuance/storage/NuanceItem.php index 3e9f7617f9..196afc44ca 100644 --- a/src/applications/nuance/storage/NuanceItem.php +++ b/src/applications/nuance/storage/NuanceItem.php @@ -2,7 +2,9 @@ final class NuanceItem extends NuanceDAO - implements PhabricatorPolicyInterface { + implements + PhabricatorPolicyInterface, + PhabricatorApplicationTransactionInterface { const STATUS_OPEN = 0; const STATUS_ASSIGNED = 10; @@ -143,4 +145,27 @@ final class NuanceItem 'dateNuanced' => $this->getDateNuanced(), ); } + + +/* -( PhabricatorApplicationTransactionInterface )------------------------- */ + + + public function getApplicationTransactionEditor() { + return new NuanceItemEditor(); + } + + public function getApplicationTransactionObject() { + return $this; + } + + public function getApplicationTransactionTemplate() { + return new NuanceItemTransaction(); + } + + public function willRenderTimeline( + PhabricatorApplicationTransactionView $timeline, + AphrontRequest $request) { + return $timeline; + } + } From 1f4cd900f3deadff1839d40f5acf7389c963c368 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 2 Jul 2015 14:24:15 -0700 Subject: [PATCH 3/8] Fix "Add Project" in bulk editor Summary: Fixes T8740. This data is required for now, and didn't get brought across properly from the original standalone foreground editor. Test Plan: Did a bulk editor "add project", got a clean result. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T8740 Differential Revision: https://secure.phabricator.com/D13533 --- .../maniphest/bulk/ManiphestTaskEditBulkJobType.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/applications/maniphest/bulk/ManiphestTaskEditBulkJobType.php b/src/applications/maniphest/bulk/ManiphestTaskEditBulkJobType.php index e24b1e7bd4..f4ca24863b 100644 --- a/src/applications/maniphest/bulk/ManiphestTaskEditBulkJobType.php +++ b/src/applications/maniphest/bulk/ManiphestTaskEditBulkJobType.php @@ -49,6 +49,8 @@ final class ManiphestTaskEditBulkJobType PhabricatorPolicyCapability::CAN_EDIT, )) ->withPHIDs(array($task->getObjectPHID())) + ->needProjectPHIDs(true) + ->needSubscriberPHIDs(true) ->executeOne(); if (!$object) { return; From a7cfc583531a7e72a3c2da2c62539914100f4ea7 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 3 Jul 2015 10:19:32 -0700 Subject: [PATCH 4/8] Explicitly document that lists can start at a number other than 1 Summary: Fixes T8584. Test Plan: {F582256} Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T8584 Differential Revision: https://secure.phabricator.com/D13543 --- src/docs/user/userguide/remarkup.diviner | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/docs/user/userguide/remarkup.diviner b/src/docs/user/userguide/remarkup.diviner index 8e022c490c..ef38552489 100644 --- a/src/docs/user/userguide/remarkup.diviner +++ b/src/docs/user/userguide/remarkup.diviner @@ -92,6 +92,9 @@ You can optionally omit the trailing `=` signs -- that is, these are the same: This produces headers like the ones in this document. Make sure you have an empty line before and after the header. +Lists +===== + Make **lists** by beginning each item with a `-` or a `*`: lang=text @@ -117,6 +120,21 @@ You can make numbered lists with a `#` instead of `-` or `*`: # Zapdos # Moltres +Numbered lists can also be started with `1.` or `1)`. If you use a number other +than `1`, the list will start at that number instead. For example, this: + +``` + 200) OK + 201) Created + 202) Accepted +``` + +...produces this: + + 200) OK + 201) Created + 202) Accepted + You can also nest lists: ```- Body From 92b73fed6b2cb98b9e262462faac88faf4108263 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 3 Jul 2015 10:59:48 -0700 Subject: [PATCH 5/8] Don't apply space constraints to omnipotent-viewer queries Summary: Fixes T8743. Fixes T8746. When running queries with the omnipotent viewer and no explicit space constraints, don't add implicit space constraints. This prevents us from fataling when running older pre-space migrations and trying to load space-aware objects. Test Plan: Manually ran migrations with `--trace`, verified no `WHERE spacePHID = ...`. Reviewers: btrahan, chad Reviewed By: chad Subscribers: eadler, epriestley Maniphest Tasks: T8743, T8746 Differential Revision: https://secure.phabricator.com/D13542 --- .../policy/PhabricatorCursorPagedPolicyAwareQuery.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php b/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php index 772be350a9..f062672783 100644 --- a/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php +++ b/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php @@ -1763,6 +1763,16 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery $viewer = $this->getViewer(); + // If we have an omnipotent viewer and no formal space constraints, don't + // emit a clause. This primarily enables older migrations to run cleanly, + // without fataling because they try to match a `spacePHID` column which + // does not exist yet. See T8743, T8746. + if ($viewer->isOmnipotent()) { + if ($this->spaceIsArchived === null && $this->spacePHIDs === null) { + return null; + } + } + $space_phids = array(); $include_null = false; From bc22413fa7ddb93a53b708e61611a1e3774f68d6 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 3 Jul 2015 13:03:33 -0700 Subject: [PATCH 6/8] When an install has spaces but a user has no access, roadblock them Summary: Ref T8449. If a user doesn't have access to any spaces, most applications just don't work, and they fail in confusing ways. Just lock users out of everything explicitly up front with a clear message instead of letting them stumble into a big broken mess. Test Plan: Locked a user out of all spaces, saw error to that effect. Reviewers: btrahan, eadler Reviewed By: eadler Subscribers: eadler, epriestley Maniphest Tasks: T8449 Differential Revision: https://secure.phabricator.com/D13545 --- src/__phutil_library_map__.php | 2 ++ .../base/controller/PhabricatorController.php | 17 ++++++++++++++-- .../PhabricatorSpacesNoAccessController.php | 20 +++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 src/applications/spaces/controller/PhabricatorSpacesNoAccessController.php diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 23d2562822..459c95643c 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -2658,6 +2658,7 @@ phutil_register_library_map(array( 'PhabricatorSpacesNamespaceSearchEngine' => 'applications/spaces/query/PhabricatorSpacesNamespaceSearchEngine.php', 'PhabricatorSpacesNamespaceTransaction' => 'applications/spaces/storage/PhabricatorSpacesNamespaceTransaction.php', 'PhabricatorSpacesNamespaceTransactionQuery' => 'applications/spaces/query/PhabricatorSpacesNamespaceTransactionQuery.php', + 'PhabricatorSpacesNoAccessController' => 'applications/spaces/controller/PhabricatorSpacesNoAccessController.php', 'PhabricatorSpacesRemarkupRule' => 'applications/spaces/remarkup/PhabricatorSpacesRemarkupRule.php', 'PhabricatorSpacesSchemaSpec' => 'applications/spaces/storage/PhabricatorSpacesSchemaSpec.php', 'PhabricatorSpacesTestCase' => 'applications/spaces/__tests__/PhabricatorSpacesTestCase.php', @@ -6450,6 +6451,7 @@ phutil_register_library_map(array( 'PhabricatorSpacesNamespaceSearchEngine' => 'PhabricatorApplicationSearchEngine', 'PhabricatorSpacesNamespaceTransaction' => 'PhabricatorApplicationTransaction', 'PhabricatorSpacesNamespaceTransactionQuery' => 'PhabricatorApplicationTransactionQuery', + 'PhabricatorSpacesNoAccessController' => 'PhabricatorSpacesController', 'PhabricatorSpacesRemarkupRule' => 'PhabricatorObjectRemarkupRule', 'PhabricatorSpacesSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'PhabricatorSpacesTestCase' => 'PhabricatorTestCase', diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php index 3476bb8f9a..1551667591 100644 --- a/src/applications/base/controller/PhabricatorController.php +++ b/src/applications/base/controller/PhabricatorController.php @@ -200,7 +200,8 @@ abstract class PhabricatorController extends AphrontController { if ($this->shouldRequireLogin()) { // This actually means we need either: // - a valid user, or a public controller; and - // - permission to see the application. + // - permission to see the application; and + // - permission to see at least one Space if spaces are configured. $allow_public = $this->shouldAllowPublic() && PhabricatorEnv::getEnvConfig('policy.allow-public'); @@ -223,10 +224,22 @@ abstract class PhabricatorController extends AphrontController { } } + // If Spaces are configured, require that the user have access to at + // least one. If we don't do this, they'll get confusing error messages + // later on. + $spaces = PhabricatorSpacesNamespaceQuery::getSpacesExist(); + if ($spaces) { + $viewer_spaces = PhabricatorSpacesNamespaceQuery::getViewerSpacesExist( + $user); + if (!$viewer_spaces) { + $controller = new PhabricatorSpacesNoAccessController(); + return $this->delegateToController($controller); + } + } + // If the user doesn't have access to the application, don't let them use // any of its controllers. We query the application in order to generate // a policy exception if the viewer doesn't have permission. - $application = $this->getCurrentApplication(); if ($application) { id(new PhabricatorApplicationQuery()) diff --git a/src/applications/spaces/controller/PhabricatorSpacesNoAccessController.php b/src/applications/spaces/controller/PhabricatorSpacesNoAccessController.php new file mode 100644 index 0000000000..7e07bd8e17 --- /dev/null +++ b/src/applications/spaces/controller/PhabricatorSpacesNoAccessController.php @@ -0,0 +1,20 @@ +newDialog() + ->setTitle(pht('No Access to Spaces')) + ->appendParagraph( + pht( + 'This install uses spaces to organize objects, but your account '. + 'does not have access to any spaces.')) + ->appendParagraph( + pht( + 'Ask someone to add you to a Space so you can view and create '. + 'objects.')) + ->addCancelButton('/', pht('Drift Aimlessly')); + } + +} From bcfbc5cfbf27b75322755207ba338c156ebe0897 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 3 Jul 2015 13:03:49 -0700 Subject: [PATCH 7/8] Remove CHECKREQUEST event Summary: Fixes T8749. Test Plan: `grep` Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T8749 Differential Revision: https://secure.phabricator.com/D13546 --- .../base/controller/PhabricatorController.php | 13 ------------- src/docs/user/userguide/events.diviner | 16 ---------------- .../events/constant/PhabricatorEventType.php | 2 -- 3 files changed, 31 deletions(-) diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php index 1551667591..b884b13557 100644 --- a/src/applications/base/controller/PhabricatorController.php +++ b/src/applications/base/controller/PhabricatorController.php @@ -157,19 +157,6 @@ abstract class PhabricatorController extends AphrontController { } } - $event = new PhabricatorEvent( - PhabricatorEventType::TYPE_CONTROLLER_CHECKREQUEST, - array( - 'request' => $request, - 'controller' => $this, - )); - $event->setUser($user); - PhutilEventEngine::dispatchEvent($event); - $checker_controller = $event->getValue('controller'); - if ($checker_controller != $this) { - return $this->delegateToController($checker_controller); - } - $auth_class = 'PhabricatorAuthApplication'; $auth_application = PhabricatorApplication::getByClass($auth_class); diff --git a/src/docs/user/userguide/events.diviner b/src/docs/user/userguide/events.diviner index 5bb8eb313a..8959585f4a 100644 --- a/src/docs/user/userguide/events.diviner +++ b/src/docs/user/userguide/events.diviner @@ -130,22 +130,6 @@ fields to, e.g., edit revision titles. Data available on this event: - `specification` Parameters that will be used to invoke the `differential.createrevision` Conduit call. -== Controller: Check Request == - -The constant for this event is -`PhabricatorEventType::TYPE_CONTROLLER_CHECKREQUEST`. - -This event is dispatched when controller is about to begin execution. It is -meant for checking if the user is allowed to use the application at the moment. -It can check if the user has performed too many operations recently, if his IP -address is allowed or if the servers are overloaded to process the request. -Data available on this event: - -- `request` Object of class @{class:AphrontRequest}. -- `controller` Class name of the current controller. - -You can delegate the execution to another controller by modifying `controller`. - == Maniphest: Will Edit Task == The constant for this event is diff --git a/src/infrastructure/events/constant/PhabricatorEventType.php b/src/infrastructure/events/constant/PhabricatorEventType.php index 3c555ac4c3..22644bc522 100644 --- a/src/infrastructure/events/constant/PhabricatorEventType.php +++ b/src/infrastructure/events/constant/PhabricatorEventType.php @@ -6,8 +6,6 @@ */ final class PhabricatorEventType extends PhutilEventType { - const TYPE_CONTROLLER_CHECKREQUEST = 'controller.checkRequest'; - const TYPE_MANIPHEST_WILLEDITTASK = 'maniphest.willEditTask'; const TYPE_MANIPHEST_DIDEDITTASK = 'maniphest.didEditTask'; From e8a213512aa04721d2c24440dcb3f708fd8ff190 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 3 Jul 2015 13:04:14 -0700 Subject: [PATCH 8/8] Unprototype Spaces Summary: Ref T8449. Also, fix annoying inconsistency between "Spaces" and "spaces": "Spaces" is the application, the things it creates are just "spaces", similar to how "Maniphest" creates "tasks". Test Plan: Mostly reading. Viewed `/applications/`. Reviewers: btrahan, chad Reviewed By: chad Subscribers: eadler, epriestley Maniphest Tasks: T8449 Differential Revision: https://secure.phabricator.com/D13547 --- .../PhabricatorSpacesApplication.php | 6 +--- src/docs/user/userguide/spaces.diviner | 36 +++++++++---------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/src/applications/spaces/application/PhabricatorSpacesApplication.php b/src/applications/spaces/application/PhabricatorSpacesApplication.php index 2f4ba394d1..66371f1bc2 100644 --- a/src/applications/spaces/application/PhabricatorSpacesApplication.php +++ b/src/applications/spaces/application/PhabricatorSpacesApplication.php @@ -31,11 +31,7 @@ final class PhabricatorSpacesApplication extends PhabricatorApplication { } public function canUninstall() { - return true; - } - - public function isPrototype() { - return true; + return false; } public function getHelpDocumentationArticles(PhabricatorUser $viewer) { diff --git a/src/docs/user/userguide/spaces.diviner b/src/docs/user/userguide/spaces.diviner index 230fa2ddc5..212def61f3 100644 --- a/src/docs/user/userguide/spaces.diviner +++ b/src/docs/user/userguide/spaces.diviner @@ -6,20 +6,18 @@ Guide to the Spaces application. Overview ======== -IMPORTANT: Spaces is a prototype application. - The Spaces application makes it easier to manage large groups of objects which share the same access policy. For example: - - An organization might make a Space for a project in order to satisfy a + - An organization might make a space for a project in order to satisfy a contractual obligation to limit access, even internally. - - An open source organization might make a Space for work related to + - An open source organization might make a space for work related to internal governance, to separate private and public discussions. - - A contracting company might make Spaces for clients, to separate them from + - A contracting company might make spaces for clients, to separate them from one another. - - A company might create a Space for consultants, to give them limited + - A company might create a spaces for consultants, to give them limited access to only the resources they need to do their work. - - An ambitious manager might create a Space to hide her team's work from her + - An ambitious manager might create a space to hide her team's work from her enemies at the company, that she might use the element of surprise to later expand her domain. @@ -39,16 +37,16 @@ them if you don't plan to use them. You can always set them up later. To activate Spaces, you need to create at least two spaces. Create spaces from the web UI, by navigating to {nav Spaces > Create Space}. By default, only -administrators can create new Spaces, but you can configure this in the +administrators can create new spaces, but you can configure this in the {nav Applications} application. -The first Space you create will be a special "default" Space, and all existing +The first space you create will be a special "default" space, and all existing objects will be shifted into this space as soon as you create it. Spaces you create later will be normal spaces, and begin with no objects inside them. Create the first space (you may want to name it something like "Default" or "Global" or "Public", depending on the nature of your organization), then -create a second Space. Usually, the second space will be something like +create a second space. Usually, the second space will be something like "Secret Plans" and have a more restrictive "Visible To" policy. @@ -57,7 +55,7 @@ Using Spaces Once you've created at least two spaces, you can begin using them. -Application UIs will change for users who can see at least two Spaces, opening +Application UIs will change for users who can see at least two spaces, opening up new controls which let them work with spaces. They will now be able to choose which space to create new objects into, be able to move objects between spaces, and be able to search for objects in a specific space or set of spaces. @@ -72,14 +70,14 @@ spaces exist. This simplifies the UI for users with limited access. Space Policies ============== -Briefly, Spaces affect policies like this: +Briefly, spacess affect policies like this: - Spaces apply their view policy to all objects inside the space. - Space policies are absolute, and stronger than all other policies. A - user who can not see a Space can **never** see objects inside the space. + user who can not see a space can **never** see objects inside the space. - Normal policies are still checked: spaces can only reduce access. -When you create a Space, you choose a view policy for that space by using the +When you create a space, you choose a view policy for that space by using the **Visible To** control. This policy controls both who can see the space, and who can see objects inside the space. @@ -90,21 +88,21 @@ and stronger than all other policy rules, including policy exceptions. For example, a user can never see a task in a space they can't see, even if they are an admin and the author and owner of the task, and subscribed to the task and the view and edit policies are set to "All Users", and they created -the Space originally and the moon is full and they are pure of heart and +the space originally and the moon is full and they are pure of heart and possessed of the noblest purpose. Spaces are impenetrable. Even if a user satisfies the view policy for a space, they must still pass the view policy on the object: the space check is a new check in addition to any check on the object, and can only limit access. -The edit policy for a space only affects the Space itself, and is not applied +The edit policy for a space only affects the space itself, and is not applied to objects inside the space. Archiving Spaces ================ -If you no longer need a Space, you can archive it by choosing +If you no longer need a space, you can archive it by choosing {nav Archive Space} from the detail view. This hides the space and all the objects in it without deleting any data. @@ -123,14 +121,14 @@ You can reactivate a space later by choosing {nav Activate Space}. Application Email ================= -After activating Spaces, you can choose a Space when configuring inbound email +After activating spaces, you can choose a space when configuring inbound email addresses in {nav Applications}. Spaces affect policies for application email just like they do for other objects: to see or use the address, you must be able to see the space which contains it. -Objects created from inbound email will be created in the Space the email is +Objects created from inbound email will be created in the space the email is associated with.