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

Change subject: Dashboards: Register new permission and add permission check on 
view of special page "User dashboard"
......................................................................


Dashboards: Register new permission and add permission check on view of special 
page "User dashboard"

Change-Id: I5787c63e0ae37964f7489f3ebd8cc7dd49e7f4e4
---
M Dashboards/Dashboards.class.php
M Dashboards/i18n/en.json
M Dashboards/i18n/qqq.json
M Dashboards/includes/specials/SpecialUserDashboard.php
4 files changed, 12 insertions(+), 6 deletions(-)

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



diff --git a/Dashboards/Dashboards.class.php b/Dashboards/Dashboards.class.php
index 3dccd08..f69111f 100644
--- a/Dashboards/Dashboards.class.php
+++ b/Dashboards/Dashboards.class.php
@@ -84,6 +84,8 @@
                $this->setHook( 'BSDashboardsUserDashboardPortalPortlets' );
                //$this->setHook( 'BSInsertMagicAjaxGetData' );
 
+               $this->mCore->registerPermission( 
'dashboards-viewspecialpage-userdashboard', array('user'), array( 'type' => 
'global' ) );
+
                wfProfileOut( 'BS::'.__METHOD__ );
        }
 
diff --git a/Dashboards/i18n/en.json b/Dashboards/i18n/en.json
index b897fa3..19cd3b2 100644
--- a/Dashboards/i18n/en.json
+++ b/Dashboards/i18n/en.json
@@ -1,7 +1,8 @@
 {
        "@metadata": {
                "authors": [
-                       "Stephan Muggli <mug...@hallowelt.biz>"
+                       "Stephan Muggli <mug...@hallowelt.biz>",
+                       "Leonid Verhovskij <verhovs...@hallowelt.com>"
                ]
        },
        "bs-dashboards-desc": "Provides dashboards for users and 
administrators",
@@ -20,5 +21,6 @@
        "apihelp-bs-dashboard-task-param-dc": "Cache control parameter. Used by 
ExtJS.",
        "apihelp-bs-dashboards-store-description": "Lists all available 
portlets",
        "apihelp-bs-dashboards-tasks-description": "Saves dashboard 
configuration",
-       "apihelp-bs-dashboards-widgets-tasks-description": "Returns content for 
some dashboard widgets"
+       "apihelp-bs-dashboards-widgets-tasks-description": "Returns content for 
some dashboard widgets",
+       "action-dashboards-viewspecialpage-userdashboard":"view the special 
page \"{{int:userdashboard}}\""
 }
diff --git a/Dashboards/i18n/qqq.json b/Dashboards/i18n/qqq.json
index 0885c23..6f97676 100644
--- a/Dashboards/i18n/qqq.json
+++ b/Dashboards/i18n/qqq.json
@@ -4,7 +4,8 @@
                        "Stephan Muggli <mug...@hallowelt.biz>",
                        "NigelSoft",
                        "Robby",
-                       "Shirayuki"
+                       "Shirayuki",
+                       "Leonid Verhovskij <verhovs...@hallowelt.com>"
                ]
        },
        "bs-dashboards-desc": "Used in 
[{{canonicalurl:Special:WikiAdmin|mode=ExtensionInfo}} 
Special:WikiAdmin?mode=ExtensionInfo], description of dashboards extension",
@@ -23,5 +24,6 @@
        "apihelp-bs-dashboard-task-param-dc": "Label for cache control 
parameter in api call",
        "apihelp-bs-dashboards-store-description": "Describes the API endpoint 
that lists available portlets",
        "apihelp-bs-dashboards-tasks-description": "Describes the API endpoint 
that saves dashboard configuration",
-       "apihelp-bs-dashboards-widgets-tasks-description": "Describes the API 
endpoint that returns content for some dashboard widgets"
+       "apihelp-bs-dashboards-widgets-tasks-description": "Describes the API 
endpoint that returns content for some dashboard widgets",
+       "action-dashboards-viewspecialpage-userdashboard": "placeholder to 
describe that view of special page \"{{int:userdashboard}}\" is restricted for 
the current user"
 }
diff --git a/Dashboards/includes/specials/SpecialUserDashboard.php 
b/Dashboards/includes/specials/SpecialUserDashboard.php
index e85347e..0758775 100644
--- a/Dashboards/includes/specials/SpecialUserDashboard.php
+++ b/Dashboards/includes/specials/SpecialUserDashboard.php
@@ -2,11 +2,11 @@
 
 class SpecialUserDashboard extends BsSpecialPage {
        public function __construct( $name = '', $restriction = '', $listed = 
true, $function = false, $file = 'default', $includable = false ) {
-               parent::__construct( 'UserDashboard' /*, 'sysop'*/ );
+               parent::__construct( 'UserDashboard' , 
'dashboards-viewspecialpage-userdashboard' );
        }
 
        /**
-        * 
+        *
         * @global OutputPage $wgOut
         * @param string $sParameter
         */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5787c63e0ae37964f7489f3ebd8cc7dd49e7f4e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Ljonka <l.verhovs...@gmail.com>
Gerrit-Reviewer: Dvogel hallowelt <daniel.vo...@hallowelt.com>
Gerrit-Reviewer: Mglaser <gla...@hallowelt.biz>
Gerrit-Reviewer: Pwirth <wi...@hallowelt.biz>
Gerrit-Reviewer: Raimond Spekking <raimond.spekk...@gmail.com>
Gerrit-Reviewer: Robert Vogel <vo...@hallowelt.biz>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to