Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14763596
D20108.id48017.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
D20108.id48017.diff
View Options
diff --git a/resources/sql/autopatches/20190206.external.01.legalpad.sql b/resources/sql/autopatches/20190206.external.01.legalpad.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20190206.external.01.legalpad.sql
@@ -0,0 +1,2 @@
+UPDATE {$NAMESPACE}_legalpad.legalpad_documentsignature
+ SET signerPHID = NULL WHERE signerPHID LIKE 'PHID-XUSR-%';
diff --git a/resources/sql/autopatches/20190206.external.02.email.sql b/resources/sql/autopatches/20190206.external.02.email.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20190206.external.02.email.sql
@@ -0,0 +1,2 @@
+DELETE FROM {$NAMESPACE}_user.user_externalaccount
+ WHERE accountType = 'email';
diff --git a/src/applications/auth/query/PhabricatorExternalAccountQuery.php b/src/applications/auth/query/PhabricatorExternalAccountQuery.php
--- a/src/applications/auth/query/PhabricatorExternalAccountQuery.php
+++ b/src/applications/auth/query/PhabricatorExternalAccountQuery.php
@@ -168,35 +168,4 @@
return 'PhabricatorPeopleApplication';
}
- /**
- * Attempts to find an external account and if none exists creates a new
- * external account with a shiny new ID and PHID.
- *
- * NOTE: This function assumes the first item in various query parameters is
- * the correct value to use in creating a new external account.
- */
- public function loadOneOrCreate() {
- $account = $this->executeOne();
- if (!$account) {
- $account = new PhabricatorExternalAccount();
- if ($this->accountIDs) {
- $account->setAccountID(reset($this->accountIDs));
- }
- if ($this->accountTypes) {
- $account->setAccountType(reset($this->accountTypes));
- }
- if ($this->accountDomains) {
- $account->setAccountDomain(reset($this->accountDomains));
- }
- if ($this->accountSecrets) {
- $account->setAccountSecret(reset($this->accountSecrets));
- }
- if ($this->userPHIDs) {
- $account->setUserPHID(reset($this->userPHIDs));
- }
- $account->save();
- }
- return $account;
- }
-
}
diff --git a/src/applications/legalpad/controller/LegalpadDocumentSignController.php b/src/applications/legalpad/controller/LegalpadDocumentSignController.php
--- a/src/applications/legalpad/controller/LegalpadDocumentSignController.php
+++ b/src/applications/legalpad/controller/LegalpadDocumentSignController.php
@@ -364,16 +364,6 @@
if ($email_obj) {
return $this->signInResponse();
}
- $external_account = id(new PhabricatorExternalAccountQuery())
- ->setViewer($viewer)
- ->withAccountTypes(array('email'))
- ->withAccountDomains(array($email->getDomainName()))
- ->withAccountIDs(array($email->getAddress()))
- ->loadOneOrCreate();
- if ($external_account->getUserPHID()) {
- return $this->signInResponse();
- }
- $signer_phid = $external_account->getPHID();
}
}
break;
diff --git a/src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php b/src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php
--- a/src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php
+++ b/src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php
@@ -226,7 +226,7 @@
$handles[$document->getPHID()]->renderLink(),
$signer_phid
? $handles[$signer_phid]->renderLink()
- : null,
+ : phutil_tag('em', array(), pht('None')),
$name,
phutil_tag(
'a',
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 24, 12:02 PM (13 h, 41 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7040237
Default Alt Text
D20108.id48017.diff (3 KB)
Attached To
Mode
D20108: Remove weird integration between Legalpad and the ExternalAccount table
Attached
Detach File
Event Timeline
Log In to Comment