Last modified: 2014-08-24 01:42:44 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 8834 - Split off permission for editing user JavaScript and CSS from "editinterface"
Split off permission for editing user JavaScript and CSS from "editinterface"
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2007-01-30 19:58 UTC by Mike Dillon
Modified: 2014-08-24 01:42 UTC (History)
2 users (show)

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

Patch to create "edituserjscss" permission (1.62 KB, patch)
2007-01-30 19:59 UTC, Mike Dillon

Description Mike Dillon 2007-01-30 19:58:21 UTC
We would like to allow users with "sysop" permission to edit the MediaWiki
namespace without being able to edit user JavaScript and CSS. In our
installation, we have already disabled site JavaScript using $wgUseSiteJs, but
we'd like to retain the ability to have user JavaScript that is not editable by

To do this, we have split the permission for editing the MediaWiki namespace and
user JS/CSS into two permissions: "editinterface" and "edituserjscss". I will
attach a patch for Title.php and DefaultSettings.php that implements this split
in my next update to this bug. The changes to Title.php change control of user
JS/CSS editing from "editinterface" to "edituserjscss". The changes to
DefaultSettings.php set "edituserjscss" to true by default for "sysop" to
maintain the existing default behavior.

The only repercussion I can see from this change is that installations that have
already disabled "editinterface" for "sysop" will have to add a setting for
"edituserjscss" when they upgrade.
Comment 1 Mike Dillon 2007-01-30 19:59:02 UTC
Created attachment 3162 [details]
Patch to create "edituserjscss" permission

This patch was created today off the SVN trunk of MediaWiki.
Comment 2 Mike Dillon 2007-02-03 15:55:36 UTC
With the SVN version, a similar effect can be acheived using
$wgNamespaceProtection by changing the permission for editing MediaWiki from
"editinterface" to a new permission. That way, "editinterface" actually only
controls editing user JS and CSS. However, this seems a little odd, since
editing the MediaWiki namespace seems to be the core purpose of the
"editinterface" permission.

$wgNamespaceProtection[NS_MEDIAWIKI] = array('editmediawikins');

If this is done, the following restores the current default install permissions
by allowing the "editmediawikins" permission for "sysop" (in addition to
"editinterface", which is already enabled):

$wgGroupPermissions['*']['editmediawikins'] = false;
$wgGroupPermissions['sysop']['editmediawikins'] = true;

However, this also has the same problem for installations that have already
restricted "editinterface".
Comment 3 Andrew Garrett 2007-09-10 08:11:10 UTC
Done in r25720. Different patch used.

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