Last modified: 2007-09-09 08:13:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 7027 - userCan hook for 'delete' needed
userCan hook for 'delete' needed
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2006-08-16 02:08 UTC by Barry
Modified: 2007-09-09 08:13 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Barry 2006-08-16 02:08:43 UTC
I would like custom handling of permissions for page deletions. There are
userCan hooks for 'read', 'edit', 'move', 'create' but not for 'delete'.

Currently various places check for $wgUser->isAllowed('delete') to decide
whether to display the 'delete'/'undelete' tabs or links, or to decide whether
to allow the deletion action.  Most of these checks could be replaced with calls
to $this->mTitle->userCanDelete().

The new userCanDelete function in Title.php would be:

	function userCanDelete() {
		return $this->userCan('delete');

Comment 1 Jean-Lou Dupont 2007-05-04 17:01:24 UTC
I would suggest extending your proposal to cover other rights that could benefit
from a namespace level scope; e.g. patrol, protect, rollback, hiderevision,

I am probably forgetting some of course.

Comment 2 Andrew Garrett 2007-09-09 08:13:55 UTC
FIXED in r25680.

Note You need to log in before you can comment on or make changes to this bug.