Page MenuHomePhabricator

Update move permission code
Closed, ResolvedPublic

Description

Per @Legoktm:

  • AbortMove has been removed completely.
  • MovePageIsValidMove should only be used for technical restrictions. NS_TOPIC qualifies here.
  • However, for permissions issues (is the destination namespace Flow and if not do they have flow-create-board), we should use MovePageCheckPermissions.

While we're at this, document these hooks on-wiki (it's currently only in docs/hooks.txt)

Event Timeline

Change 273414 had a related patch set uploaded (by Mattflaschen):
Better error handling and hook use for moves

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

Change 273414 merged by jenkins-bot:
Better error handling and hook use for moves

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

Checked in betalabs as part of verifying T127785: Board moves in Flow not working and T127693: Flow board move requiring allowCreation fails on zh.wp.

  • a user without Flow bot rights can move non-Flow pages
  • a user with Flow bot rights can move Flow pages and non-Flow pages
  • protected pages and subpages also were checked

Additionaly checked on cawiki which has Flow enabled namespaces, e.g. Flow test talk and Viquipèdia Discussió.

A user who with the 'Move' option available (e.g. Autoconfirmed) can move Flow board to the Flow enabled namespaces.

Also checked the following combinations when moving to Flow enabled namespaces:

  • wikitext page to Flow enabled namespace
  • Flow enabled page to non-Flow enabled namespace

In all cases the structure of the page is preserved - wikitext remains wikitext, and Flow enabled page is still a Flow page.