- /**
- * Checks that the user has permissions to perform rotations.
- * @param User $user The user to check
- * @param Title $title
- * @return string|null Permission error message, or null if there is no error
- */
- protected function checkPermissions( $user, $title ) {
- $permissionErrors = array_merge(
- $title->getUserPermissionsErrors( 'edit', $user ),
- $title->getUserPermissionsErrors( 'upload', $user )
- );
-
- if ( $permissionErrors ) {
- // Just return the first error
- $msg = $this->parseMsg( $permissionErrors[0] );
-
- return $msg['info'];
- }
-
- return null;
- }
-