Last modified: 2007-09-09 08:13:55 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'); } Easy?!
I would suggest extending your proposal to cover other rights that could benefit from a namespace level scope; e.g. patrol, protect, rollback, hiderevision, deleterevision. I am probably forgetting some of course. [user:jldupont]
FIXED in r25680.