Page MenuHomePhabricator

New user right for creation of new short URL
Closed, ResolvedPublic

Description

There may be use cases to limit creation of new short URL to a specific user group.

After this, we can grant the right to all users in meta, then remove $wgUrlShortenerReadOnly.

Details

Related Gerrit Patches:
mediawiki/extensions/UrlShortener : masterAdd user right requirement for creating new short urls

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 23 2019, 6:15 PM
DannyS712 added a subscriber: DannyS712.

It should be fairly trivial to add this user right requirement to the special page and the api. Given that currently no user right is required, I'll also edit the extension.json to grant the user right to all (*) by default. Currently, there is a user right for managing short urls, urlshortener-manage-url - for the user right to create them, what about urlshortener-create-url?

Restricted Application added a project: User-DannyS712. · View Herald TranscriptJul 23 2019, 6:20 PM
Bugreporter added a comment.EditedJul 23 2019, 6:22 PM

Note after the right is added it should be revoked from all Wikimedia wikis except meta.

In addition, it should be assigned to a proper grant.

DannyS712 added a comment.EditedJul 23 2019, 6:24 PM

Note after the right is added it should be revoked from all Wikimedia wikis except meta.
In addition, it should be assigned to a proper grant.

Noted. Should it be added to an existing grant, or should a new grant be created?

DannyS712 moved this task from Unsorted to Next on the User-DannyS712 board.Jul 23 2019, 6:24 PM

There may be use cases to limit creation of new short URL to a specific user group.

Please given an example. I don't yet see such a use case.

Bugreporter added a comment.EditedJul 23 2019, 9:02 PM

This is useful in 3rd party installation of this extension. It's logical to require user to be logged in to use the feature if the feature have been spammed.

Change 525188 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/UrlShortener@master] Add user right requirement for creating new short urls

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

@Bugreporter I've uploaded a patch that should cover this, with the default settings (i.e. not changing any user rights) having the same result as the current default

Change 525188 merged by jenkins-bot:
[mediawiki/extensions/UrlShortener@master] Add user right requirement for creating new short urls

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

Legoktm closed this task as Resolved.Aug 1 2019, 9:42 AM