Page MenuHomePhabricator

Special:UserLogin <title>,<h1> should check $wgUser->isAllowed( 'createaccount' )
Closed, ResolvedPublic

Description

We see that setting
$wgGroupPermissions['*']['createaccount']=false

  1. Nicely leaves only 'Log in' in the upper right corner of the screen.
  2. Nicely leaves only the 'Log in' box in the middle of the screen.

However, the <title> and <h1> still mention both "Log in / create account"!

The use might wonder "hey, where can I create the account it mentions?"

(Indeed, you might even go the whole hog and make Special:SpecialPages list it differently too.)


Version: 1.16.x
Severity: trivial
URL: http://abj.jidanni.org/index.php?title=Special:UserLogin

Details

Reference
bz20115

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:53 PM
bzimport set Reference to bz20115.

s/The use might/The user might/

(Indeed, you might even go the whole hog and make Special:SpecialPages list it
differently too.)

Which is in fact a _different_ bug 19186.

karun.84 wrote:

Patch to fix bug 20115

I have started a patch to create two separate messages userlogin and userlogincreate. I attach it. With the patch, when the permission to create accounts is set to true, it does not show the correct message.
I am not sure why this is the case. Could someone review it and advise the cause?

attachment bug20115.patch ignored as obsolete

karun.84 wrote:

Patch that fixes bug 20115

In relation to my previous comment, I found that I was not using user permissions correctly. This patch fixes the bug with the creation of a new message userlogincreate and modification to userlogin.

attachment bug20115-v2.patch ignored as obsolete

Looks good, two comments: use svn diff instead of diff --git, and add the newly created message to maintenance/language/messages.inc.

karun.84 wrote:

Patch to fix bug

Ive added it to the messages.inc file and used svn diff.

attachment bug-20115-v3.patch ignored as obsolete

(In reply to comment #6)

Created an attachment (id=6918) [details]
Patch to fix bug

Ive added it to the messages.inc file and used svn diff.

There seem to be some unrelated changes in your diff (two in MessagesEn.php, and the $wgProxyWhitelist change).

karun.84 wrote:

Patch for bug 20115 with unrelated changes removed and in svn diff format

Ive removed the unrelated changes, and the patch only includes the changes for this bug, and is in svn diff format.

Please review.
Thanks

Attached:

Modified patch committed in r60563.