jenkins-bot has submitted this change and it was merged.

Change subject: TranslationStash: If user is not sandboxed, redirect to the 
main page
......................................................................


TranslationStash: If user is not sandboxed, redirect to the main page

Change-Id: Iefaf8379ba6d4faf315b047398b81879a1fa032d
---
M specials/SpecialTranslationStash.php
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Nikerabbit: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/specials/SpecialTranslationStash.php 
b/specials/SpecialTranslationStash.php
index fa8ad96..5a9bbfe 100644
--- a/specials/SpecialTranslationStash.php
+++ b/specials/SpecialTranslationStash.php
@@ -20,6 +20,14 @@
        public function execute( $params ) {
                $this->setHeaders();
                $out = $this->getOutput();
+
+               if ( !TranslateSandbox::isSandboxed( $this->getUser() ) ) {
+                       // Not a sandboxed user, redirect to Special:Translate
+                       $out->redirect( Title::newMainPage()->getLocalUrl() );
+
+                       return;
+               }
+
                $out->addModules( 'ext.translate.special.translationstash' );
                $this->showPage();
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/89149
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iefaf8379ba6d4faf315b047398b81879a1fa032d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to