Page MenuHomeMiraheze

Cannot assign a custom $wgNamespaceProtection permission to a user group
Closed, DeclinedPublic

Description

ManageWiki's $wgNamespaceProtection right accepts any input, but custom permission names cannot be assigned. Under ManageWiki/namespaces, it is possible to set any valid value for $wgNamespaceProtection; entries for this variable are not restricted to drop down values. When a custom value is used, the value does not appear on ManageWiki/permissions in the unassigned permissions for any user group. It is impossible to assign a custom $wgNamespaceProtection permission to a user group using ManageWiki.

Event Timeline

dross triaged this task as Normal priority.Dec 22 2021, 05:04
dross created this task.
Unknown Object (User) added a comment.Dec 22 2021, 05:18

This is intentional behaviour. Custom rights need to be requested to be added directly to LS and then can be used there. ManageWiki doesn't (and likely wont) support creating custom rights. If it were restricted to drop down values this also creates performance issues, as the dropdown would become quite large, and to many elements create performance issues. That's why it is like it is.

Okay for me, what I have observed, in ManageWiki/permissions, there are some rights that are available when you're customising a particular usergroup. Some of there rights are not, or will not be available when you're editing another user group. I don't understand this behaviour tbh. I can't really go deep into managewiki right now, to bring them out but yes, it happens.

If I were to make a recommendation, I would simply remove the ability to configure $wgNamespaceProtection from the ManageWiki interface if there is no intention to support adding custom permissions for assignment. ManageWiki configuration of $wgNamespaceProtection is useless otherwise.

Hmm, would it be possible to simply put the values of $wgNamespaceProtection into $wgAvailableRights? Or would this not work because this config would be loaded after everything else that depends on $wgAvailableRights?

Unknown Object (User) added a comment.Dec 23 2021, 01:43
In T8498#171695, @dross wrote:

If I were to make a recommendation, I would simply remove the ability to configure $wgNamespaceProtection from the ManageWiki interface if there is no intention to support adding custom permissions for assignment. ManageWiki configuration of $wgNamespaceProtection is useless otherwise.

Well I know alot of wikis still use it for setting namespace-wide protection with existing rights. So it isn't exactly useless.

In T8498#171696, @Void wrote:

Hmm, would it be possible to simply put the values of $wgNamespaceProtection into $wgAvailableRights? Or would this not work because this config would be loaded after everything else that depends on $wgAvailableRights?

Kinda why I figured I would file this. If a new right can be defined for $wgNamespaceProtection, why couldn't the same right be inserted elsewhere too?

Unknown Object (User) lowered the priority of this task from Normal to Low.Dec 31 2021, 17:08
Unknown Object (User) moved this task from Backlog to Features on the ManageWiki board.
Unknown Object (User) moved this task from Short Term to Long Term on the Technology-Team (MediaWiki) board.
Unknown Object (User) moved this task from Unsorted to Long Term on the Universal Omega board.
Unknown Object (User) closed this task as Declined.Jan 3 2022, 06:58
Unknown Object (User) claimed this task.
In T8498#171700, @dross wrote:
In T8498#171696, @Void wrote:

Hmm, would it be possible to simply put the values of $wgNamespaceProtection into $wgAvailableRights? Or would this not work because this config would be loaded after everything else that depends on $wgAvailableRights?

Kinda why I figured I would file this. If a new right can be defined for $wgNamespaceProtection, why couldn't the same right be inserted elsewhere too?

A new right can't be defined for that, only existing rights can be used in the field to actually hold any value. I looked into ways to implement custom rights here today as Void mentioned above, it doesn't seem like it would really work. Unfortunately not much further can be done here. Closing as declined. $wgNamespaceProtection is still useful for existing rights though so it shouldn't be removed either.