Add user rights 'viewmywatchlist', 'editmywatchlist'
[lhc/web/wiklou.git] / includes / specials / SpecialWatchlist.php
index f5e3660..8340465 100644 (file)
@@ -26,8 +26,8 @@ class SpecialWatchlist extends SpecialPage {
        /**
         * Constructor
         */
-       public function __construct( $page = 'Watchlist' ) {
-               parent::__construct( $page );
+       public function __construct( $page = 'Watchlist', $restriction = 'viewmywatchlist' ) {
+               parent::__construct( $page, $restriction );
        }
 
        /**
@@ -54,6 +54,9 @@ class SpecialWatchlist extends SpecialPage {
                        return;
                }
 
+               // Check permissions
+               $this->checkPermissions();
+
                // Add feed links
                $wlToken = $user->getOption( 'watchlisttoken' );
                if ( !$wlToken ) {