Add switch for readonly watchlists
[lhc/web/wiklou.git] / includes / ServiceWiring.php
index 246b838..79e5b84 100644 (file)
@@ -166,6 +166,11 @@ return [
                        $services->getReadOnlyMode()
                );
                $store->setStatsdDataFactory( $services->getStatsdDataFactory() );
+
+               if ( $services->getMainConfig()->get( 'ReadOnlyWatchedItemStore' ) ) {
+                       $store = new NoWriteWatchedItemStore( $store );
+               }
+
                return $store;
        },