Page MenuHomePhabricator

Write a global function to help assign rights to a user group
Open, MediumPublic

Description

I have a idea. At present people are assigning permissions to a user group, like:

$wgGroupPermissions['sysop']['interwiki'] = true;
$wgGroupPermissions['sysop']['flow-create-board'] = true;
$wgGroupPermissions['sysop']['bigdelete'] = true;

If we write a help function to help assign rights, like:

$rights = ['interwiki', 'bigdelete', 'flow-create-board'];
wfNewFun( 'sysop', $rights );

This can improve the readability of LocalSettings.php and reduce the cost of maintenance.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 6 2018, 11:16 AM

Change 431506 had a related patch set uploaded (by 星耀晨曦; owner: RazeSoldier):
[mediawiki/core@master] Create a global function to help assign rights to a user group

https://gerrit.wikimedia.org/r/431506

Vvjjkkii renamed this task from Write a global function to help assign rights to a user group to zidaaaaaaa.Jul 1 2018, 1:11 AM
Vvjjkkii removed RazeSoldier as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
RazeSoldier renamed this task from zidaaaaaaa to Write a global function to help assign rights to a user group.Jul 1 2018, 8:44 AM
RazeSoldier claimed this task.
RazeSoldier lowered the priority of this task from High to Medium.
RazeSoldier updated the task description. (Show Details)
RazeSoldier edited subscribers, added: GerritBot, Aklapper; removed: RazeSoldier.
Aklapper removed a subscriber: GerritBot.Mar 22 2020, 9:32 PM
Ammarpad added a subscriber: Ammarpad.

I think this is really a good idea and I have been thinking of how to reduce the amount of these permission assignment lines. Not sure if there's downside though. Adding core team for review