Ljonka has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/303988

Change subject: RSSFeeder: Register new permission and add permission check on 
view of special page
......................................................................

RSSFeeder: Register new permission and add permission check on view of special 
page

Change-Id: If8913e3e6401d4047f203a39170edd01928c6f02
---
M RSSFeeder/RSSFeeder.class.php
M RSSFeeder/i18n/en.json
M RSSFeeder/i18n/qqq.json
M RSSFeeder/includes/specials/SpecialRSSFeeder.class.php
4 files changed, 10 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/88/303988/1

diff --git a/RSSFeeder/RSSFeeder.class.php b/RSSFeeder/RSSFeeder.class.php
index c808791..d32d124 100644
--- a/RSSFeeder/RSSFeeder.class.php
+++ b/RSSFeeder/RSSFeeder.class.php
@@ -22,6 +22,7 @@
  * For further information visit http://www.blue-spice.org
  *
  * @author     Sebastian Ulbricht <sebastian.ulbri...@dragon-design.hk>
+ * @author     Leonid Verhovskij <verhovs...@hallowelt.com>
  * @version    2.23.1
  * @package    Bluespice_Extensions
  * @subpackage RSSFeeder
@@ -69,6 +70,9 @@
                $this->setHook( 'BSDashboardsAdminDashboardPortalConfig' );
                $this->setHook( 'BSDashboardsUserDashboardPortalPortlets' );
                $this->setHook( 'BSDashboardsUserDashboardPortalConfig' );
+
+               $this->mCore->registerPermission( 'rssfeeder-viewspecialpage', 
array('user'), array( 'type' => 'global' ) );
+
                wfProfileOut( 'BS::'.__METHOD__ );
        }
 
diff --git a/RSSFeeder/i18n/en.json b/RSSFeeder/i18n/en.json
index 81e644e..ff1a7e1 100644
--- a/RSSFeeder/i18n/en.json
+++ b/RSSFeeder/i18n/en.json
@@ -14,5 +14,6 @@
        "bs-rssfeeder-rss": "RSS feed",
        "bs-rssfeeder-rss-desc": "Create your own RSS feed",
        "bs-extjs-rssfeeder-rss-title": "RSS URL",
-       "bs-rssfeeder-invalid-url": "Please provide a valid URL."
+       "bs-rssfeeder-invalid-url": "Please provide a valid URL.",
+       "action-rssfeeder-viewspecialpage":"view the special page 
\"{{int:rssfeeder}}\""
 }
diff --git a/RSSFeeder/i18n/qqq.json b/RSSFeeder/i18n/qqq.json
index a370e3c..74ac32a 100644
--- a/RSSFeeder/i18n/qqq.json
+++ b/RSSFeeder/i18n/qqq.json
@@ -15,5 +15,6 @@
        "bs-rssfeeder-rss": "Used in [[Special:AdminDashboard]] and 
[[Special:UserDashboard]], headline for rss feed portlet.\n{{Identical|RSS 
feed}}",
        "bs-rssfeeder-rss-desc": "Used in [[Special:AdminDashboard]] and 
[[Special:UserDashboard]], description of rss feed portlet",
        "bs-extjs-rssfeeder-rss-title": "Used in [[Special:AdminDashboard]] and 
[[Special:UserDashboard]], label for rss URL.",
-       "bs-rssfeeder-invalid-url": "Error message when URL is not provided in 
the API"
+       "bs-rssfeeder-invalid-url": "Error message when URL is not provided in 
the API",
+       "action-rssfeeder-viewspecialpage":"placeholder to describe that view 
of special page \"{{int:rssfeeder}}\" is restricted for the current user"
 }
diff --git a/RSSFeeder/includes/specials/SpecialRSSFeeder.class.php 
b/RSSFeeder/includes/specials/SpecialRSSFeeder.class.php
index 534716e..3184a5a 100644
--- a/RSSFeeder/includes/specials/SpecialRSSFeeder.class.php
+++ b/RSSFeeder/includes/specials/SpecialRSSFeeder.class.php
@@ -3,14 +3,14 @@
 class SpecialRSSFeeder extends BsSpecialPage {
 
        public function __construct() {
-               parent::__construct( 'RSSFeeder' );
+               parent::__construct( 'RSSFeeder', 'rssfeeder-viewspecialpage' );
        }
 
        /**
         *
         * @global OutputPage $this->getOutput()
         * @param type $sParameter
-        * @return type 
+        * @return type
         */
        public function execute( $sParameter ) {
                parent::execute( $sParameter );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8913e3e6401d4047f203a39170edd01928c6f02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Ljonka <l.verhovs...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to