Page MenuHomePhabricator

Update requireLogin() for temp users on UrlShortener extension
Closed, ResolvedPublic

Description

In T344276, we want to make sure the SpecialPage::requireLogin() function is used in accordance with the introduction of temporary users. As for now, we want to treat temporary users just like anonymous or IP users.

Request:
Should requireLogin() be available to temporary users?
If yes, no update is needed.
If not, requireNamedUser must return true instead.

Notes:
RequireLogin was found in the following files:
includes/SpecialManageShortUrls.php
Code Search Link

Event Timeline

This extension is not really owned or maintained by any team, I'm helping in simple stuff in my volunteer capacity. I'll check and make the changes as necessary

I think our team can take this on @Ladsgroup. Thanks for the offer though!

oh thank you! I really appreciate it.

requireLogin is called in the permissions check:

/**
 * Require users to be logged in and have the rights
 *
 * @param User $user
 */
protected function checkExecutePermissions( User $user ) {
	parent::checkExecutePermissions( $user );
	$this->requireLogin();
}

I can't see a technical reason that temporary users should not access the special page. If they're not trusted to use it, that can be handled via the config (i.e. don't assign the urlshortener-manage-url right to temporary users).

Tchanders claimed this task.

Having discussed with @Ladsgroup, the above seems acceptable