Merge "Fix logic in NamespaceInfo::getRestrictionLevels"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 22 May 2019 09:48:08 +0000 (09:48 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 22 May 2019 09:48:08 +0000 (09:48 +0000)
1  2 
tests/phpunit/includes/title/NamespaceInfoTest.php

@@@ -601,7 -601,6 +601,7 @@@ class NamespaceInfoTest extends MediaWi
         * getSubject/Talk/Associated
         * %{
         */
 +
        /**
         * @dataProvider provideSubjectTalk
         * @covers NamespaceInfo::getSubject
  
        // No canonical namespace names
        // %{
 +
        /**
         * @covers NamespaceInfo::getCanonicalNamespaces
         */
  
        // Hook namespaces
        // %{
 +
        /**
         * @return array Expected canonical namespaces
         */
  
        // Extra namespaces
        // %{
 +
        /**
         * @return NamespaceInfo
         */
  
        // Canonical namespace caching
        // %{
 +
        /**
         * @covers NamespaceInfo::getCanonicalNamespaces
         */
                        'No namespace restriction' => [ [ '', 'autoconfirmed', 'sysop' ], NS_TALK ],
                        'Restricted to autoconfirmed' => [ [ '', 'sysop' ], NS_MAIN ],
                        'Restricted to sysop' => [ [ '' ], NS_USER ],
-                       // @todo Bug -- 'sysop' protection should be allowed in this case. Someone who's
-                       // autoconfirmed and also privileged can edit this namespace, and would be blocked by
-                       // the sysop protection.
-                       'Restricted to someone in two groups' => [ [ '' ], 101 ],
+                       'Restricted to someone in two groups' => [ [ '', 'sysop' ], 101 ],
                        'No special permissions' => [ [ '' ], NS_TALK, $this->getMockUser() ],
                        'autoconfirmed' => [
                                [ '', 'autoconfirmed' ],