Page MenuHomePhabricator

Hide upload for users not allowed to upload
Closed, ResolvedPublic


Author: achuggard

Using wgGroupPermissions, we can prevent groups of people from uploading,
however the link to upload a file is still displayed on every page if the
current user is not allowed to upload. See the attached patch for a
<strike>cheap hack</strike> quick fix.

It may be preferable however to solve this by adding a new hook to the end of
SkinTemplate::buildNavUrls() allowing administrators to write their own
extensions to customize the display of the nav_urls sitewide.
'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' isn't sufficient in this case
as it is not invoked for special pages (and a few other cases).

Version: 1.8.x
Severity: trivial
OS: Linux
Platform: PC



Event Timeline

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

achuggard wrote:

SkinTemplate patch

Patch to SkinTemplate.php


achuggard wrote:

Priority -> Low, Severity -> trivial

robchur wrote:

*** This bug has been marked as a duplicate of 3556 ***