+ $this->dieWithError( 'apierror-cantoverwrite-sharedfile' );
+ }
+ }
+
+ // Rate limit
+ if ( $user->pingLimiter( 'move' ) ) {
+ $this->dieWithError( 'apierror-ratelimited' );
+ }
+
+ // Check if the user is allowed to add the specified changetags
+ if ( $params['tags'] ) {
+ $ableToTag = ChangeTags::canAddTagsAccompanyingChange( $params['tags'], $user );
+ if ( !$ableToTag->isOK() ) {
+ $this->dieStatus( $ableToTag );