Page MenuHomePhabricator

Show an error to an unprivilleged user trying to create account
Closed, ResolvedPublic

Description

Author: rotemliss

Description:

  1. Set $wgGroupPermissions["*"]["createaccount"] = false.
  2. Log out.
  3. Go to the accout creation page.

Expected results:
An error is shown.

Actual results:
Only the "emailforlost" message is shown. However, if the user sends the
parameters to the create account page (with action=submit) in another way, he
gets the error message.

Cause:
The error message is shown only when the account is created, not in the form.
Also, the template checks for the data 'create' (which checks if the user is
allowed to create account), and hides most of the account creation form when it
is false. However, we should display an error message.

Fix:
Delete the check for 'create' in the data, and delete 'create' itself which is
unused, then really check (before the form) if the user is allowed to create
account, and show an error message if not.


Version: unspecified
Severity: minor

Details

Reference
bz6189

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:21 PM
bzimport set Reference to bz6189.
bzimport added a subscriber: Unknown Object (MLST).

rotemliss wrote:

Patch (trunk)

Attached:

rotemliss wrote:

Commited to r14840.