}
protected function showResetForm() {
- if ( !$this->getUser()->isAllowed( 'editmyoptions' ) ) {
+ if ( !MediaWikiServices::getInstance()
+ ->getPermissionManager()
+ ->userHasRight( $this->getUser(), 'editmyoptions' )
+ ) {
throw new PermissionsError( 'editmyoptions' );
}
}
public function submitReset( $formData ) {
- if ( !$this->getUser()->isAllowed( 'editmyoptions' ) ) {
+ if ( !MediaWikiServices::getInstance()
+ ->getPermissionManager()
+ ->userHasRight( $this->getUser(), 'editmyoptions' )
+ ) {
throw new PermissionsError( 'editmyoptions' );
}