diff --git a/includes/Menu/PageActions/UserNamespaceOverflowBuilder.php b/includes/Menu/PageActions/UserNamespaceOverflowBuilder.php index 060e70d06..5e7d54441 100644 --- a/includes/Menu/PageActions/UserNamespaceOverflowBuilder.php +++ b/includes/Menu/PageActions/UserNamespaceOverflowBuilder.php @@ -90,12 +90,22 @@ class UserNamespaceOverflowBuilder implements IOverflowBuilder { ) ); } + $permissionChangeAction = array_key_exists( 'unprotect', $actions ) ? + $this->buildFromToolbox( 'unprotect', 'unLock', 'unprotect', $actions ) : + $this->buildFromToolbox( 'protect', 'lock', 'protect', $actions ); + $possibleEntries = array_filter( [ $this->buildFromToolbox( 'user-groups', 'userGroup', 'userrights', $toolbox ), $this->buildFromToolbox( 'logs', 'listBullet', 'log', $toolbox ), $this->buildFromToolbox( 'info', 'infoFilled', 'info', $toolbox ), $this->buildFromToolbox( 'permalink', 'link', 'permalink', $toolbox ), - $this->buildFromToolbox( 'backlinks', 'articleRedirect', 'whatlinkshere', $toolbox ) + $this->buildFromToolbox( 'backlinks', 'articleRedirect', 'whatlinkshere', $toolbox ), + $this->permissions->isAllowed( IMinervaPagePermissions::MOVE ) ? + $this->buildFromToolbox( 'move', 'move', 'move', $actions ) : null, + $this->permissions->isAllowed( IMinervaPagePermissions::DELETE ) ? + $this->buildFromToolbox( 'delete', 'trash', 'delete', $actions ) : null, + $this->permissions->isAllowed( IMinervaPagePermissions::PROTECT ) ? + $permissionChangeAction : null ] ); foreach ( $possibleEntries as $menuEntry ) {