Lectrician1 added a subscriber: daniel. Lectrician1 added a comment.
Spent about 6 hours trying to solve this and was unable to. Tried making the user in $this->entityStore->saveEntity( $wikidataEntity, "imported from [[wikidata:$wikidataEntityId]]", $this->authority, EDIT_NEW | EDIT_FORCE_BOT )->getEntity(); an UltimateAuthority if ( !$this->getOption( 'dry-run', false ) ) { $this->user = User::newSystemUser( 'WikibaseQualityConstraints importer' ); $this->authority = new UltimateAuthority( $this->user ); } which is supposed to be used for maintenance scripts as it is allowed all permissions (isAllowed always returns true) so it will pass private function toRateLimitSubject(): RateLimitSubject { $flags = [ 'exempt' => $this->isAllowed( 'noratelimit' ), 'newbie' => $this->isNewbie(), ]; return new RateLimitSubject( $this, $this->getRequest()->getIP(), $flags ); } and changed all associated methods to use an Authority instead of User but that didn't work because somehow MediaWiki creates a FauxRequest for the edit action somewhere in the code and the User for that FauxRequest is not the UltimateAuthority that was created so public function getNewId( $type ) { if ( $this->contextSource->getUser()->pingLimiter( self::RATELIMIT_NAME ) ) { throw new StorageException( Status::newFatal( 'actionthrottledtext' ) ); } return $this->idGenerator->getNewId( $type ); } in RateLimitingIdGenerator ends up pinging the limiter. Wikibase is too hard. Authority and User are too confusing. @daniel probably knows how to solve this. TASK DETAIL https://phabricator.wikimedia.org/T335634 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lectrician1 Cc: daniel, Aklapper, Lectrician1, Astuthiodit_1, karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, Akuckartz, darthmon_wmde, Eihel, Nandana, Lahi, Gq86, Lucas_Werkmeister_WMDE, GoranSMilovanovic, QZanden, Esc3300, LawExplorer, _jensen, rosalieper, Agabi10, Scott_WUaS, abian, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org