From fe29db6b92de8d5a1fabbada7bbd1d4232c57ef7 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 9 Jul 2014 08:01:34 -0700 Subject: [PATCH] Use shouldAllowPublic(), not shouldRequireLogin(), for Legalpad Summary: This got written a while ago and is using slightly incorrect gating on logged-out users. The names of these methods should probably be more clear too, but basically "shouldAllowPublic()" is for "this page may be usable to logged-out users, if policies allow it", while "shouldRequireLogin()" is for "this page should skip various credential checks". One of the skipped checks is email verification. This method should maybe be something like "isAuthenticationRelatedOrNoncredentialPage()" but I don't have a good name for that. Test Plan: Unverified users are now prompted to verify email when viewing a legalpad document, instead of allowed to sign it. Reviewers: rush898, chad Reviewed By: chad Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D9857 --- .../legalpad/controller/LegalpadDocumentDoneController.php | 2 +- .../legalpad/controller/LegalpadDocumentSignController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/legalpad/controller/LegalpadDocumentDoneController.php b/src/applications/legalpad/controller/LegalpadDocumentDoneController.php index 7565b40cf9..8b628e625c 100644 --- a/src/applications/legalpad/controller/LegalpadDocumentDoneController.php +++ b/src/applications/legalpad/controller/LegalpadDocumentDoneController.php @@ -2,7 +2,7 @@ final class LegalpadDocumentDoneController extends LegalpadController { - public function shouldRequireLogin() { + public function shouldAllowPublic() { return false; } diff --git a/src/applications/legalpad/controller/LegalpadDocumentSignController.php b/src/applications/legalpad/controller/LegalpadDocumentSignController.php index 31e64ba225..34d88cf60d 100644 --- a/src/applications/legalpad/controller/LegalpadDocumentSignController.php +++ b/src/applications/legalpad/controller/LegalpadDocumentSignController.php @@ -4,7 +4,7 @@ final class LegalpadDocumentSignController extends LegalpadController { private $id; - public function shouldRequireLogin() { + public function shouldAllowPublic() { return false; }