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

Change subject: Restricting CollaborationHubContent and 
CollaborationListContent to user and project namespaces.
......................................................................


Restricting CollaborationHubContent and CollaborationListContent to user and 
project namespaces.

Bug: T141004
Change-Id: Id19a49287e5a6453bc35e2c0e3d8816e9b8a6119
---
M includes/content/CollaborationHubContentHandler.php
M includes/content/CollaborationListContentHandler.php
2 files changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/includes/content/CollaborationHubContentHandler.php 
b/includes/content/CollaborationHubContentHandler.php
index 9dd3024..d6a8e0e 100644
--- a/includes/content/CollaborationHubContentHandler.php
+++ b/includes/content/CollaborationHubContentHandler.php
@@ -6,6 +6,13 @@
                parent::__construct( $modelId );
        }
 
+       public function canBeUsedOn( Title $title ) {
+               if ( $title->inNamespace( NS_PROJECT ) || $title->inNamespace( 
NS_USER ) ) {
+                       return true;
+               }
+               return false;
+       }
+
        /**
         * @param string $text
         * @param string $format
diff --git a/includes/content/CollaborationListContentHandler.php 
b/includes/content/CollaborationListContentHandler.php
index d2b04a7..b10da7c 100644
--- a/includes/content/CollaborationListContentHandler.php
+++ b/includes/content/CollaborationListContentHandler.php
@@ -19,6 +19,13 @@
                parent::__construct( $modelId, $formats );
        }
 
+       public function canBeUsedOn( Title $title ) {
+               if ( $title->inNamespace( NS_PROJECT ) || $title->inNamespace( 
NS_USER ) ) {
+                       return true;
+               }
+               return false;
+       }
+
        /**
         * @param string $text
         * @param string $format

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id19a49287e5a6453bc35e2c0e3d8816e9b8a6119
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej <[email protected]>
Gerrit-Reviewer: Harej <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to