$this->dieUsageMsg( reset( $errors ) );
}
+ $user = $this->getUser();
+ $tags = $params['tags'];
+
+ // Check if user can add tags
+ if ( !is_null( $tags ) ) {
+ $ableToTag = ChangeTags::canAddTagsAccompanyingChange( $tags, $user );
+ if ( !$ableToTag->isOK() ) {
+ $this->dieStatus( $ableToTag );
+ }
+ }
+
$expiry = (array)$params['expiry'];
if ( count( $expiry ) != count( $params['protections'] ) ) {
if ( count( $expiry ) == 1 ) {
$expiryarray,
$cascade,
$params['reason'],
- $this->getUser()
+ $user,
+ $tags
);
if ( !$status->isOK() ) {
ApiBase::PARAM_DFLT => 'infinite',
],
'reason' => '',
+ 'tags' => [
+ ApiBase::PARAM_TYPE => 'tags',
+ ApiBase::PARAM_ISMULTI => true,
+ ],
'cascade' => false,
'watch' => [
ApiBase::PARAM_DFLT => false,