Last modified: 2014-02-14 21:54:01 UTC
Article.php returns noarticletext without checking $wgNamespaceProtection. This causes the user to see: "There is currently no text in this page, you can search for this page title in other pages _or edit this page_." However, when he clicks that very "edit this page". He is told: You do not have permission to edit this page, for the following reason: You do not have permission to edit pages in the ... namespace. "Bait and switch." To reproduce, set e.g., $wgNamespaceProtection[NS_...]='*'; and visit some nonexistent page in that namespace.
More info: In LocalSettings.php, do foreach(array('createaccount','edit','createpage','createtalk')as $i){$wgGroupPermissions['*'][$i]=false;}; Now browse title=User_talk:NoPageHereYet&action=edit . You will encounter this message: 'nocreatetext' => '{{SITENAME}} has restricted the ability to create new pages. You can go back and edit an existing page, or [[Special:UserLogin|log in or create an account]].', However such blanket statements need to check first if the user can indeed edit an existing page, or create an account. Now browse just title=User_talk:NoPageHereYet . You will get 'noarticletext' => 'There is currently no text in this page. You can [[Special:Search/{{PAGENAME}}|search for this page title]] in other pages, <span class="plainlinks"> [{{fullurl:Special:Log|page={{urlencode:{{FULLPAGENAME}}}}}} search the related logs], or [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>.', Here again, they might not have permission to "edit this page", so there ought to be a check before saying so.
*** Bug 11177 has been marked as a duplicate of this bug. ***
I have a doubt if the page isn't created can't only the permissions be set on create? If possible kindly provide a link of this kind of page.
I'm sorry I can't help on this any more. I am now busy doing other things.
I think it is no longer an issue. I put $wgGroupPermissions['*']['edit'] = false; and it says WIKI NAME has restricted the ability to create new pages. You can go back and edit an existing page, or log in or create an account. screenshot attached
Created attachment 14212 [details] showing login required page
Well then I guess it must be fixed now.
Change 105158 had a related patch set uploaded by Cargan: bug 17630 fix; added aditional check if anonymous user can create/edit none existing page, if not display permission error https://gerrit.wikimedia.org/r/105158
I added a patch. Screenshot provided.
Created attachment 14218 [details] clear message of permission error
Change 105167 had a related patch set uploaded by Cargan: (bug 17630) Add edit page permission check https://gerrit.wikimedia.org/r/105167
Change 105167 had a related patch set uploaded by Nemo bis: Add edit page permission check https://gerrit.wikimedia.org/r/105167