- ->rawParams( $userToolLinks )->parse() .
- $this->msg( 'userrights-groups-help', $user->getName() )->parse() .
- $grouplist .
- $this->groupCheckboxes( $groups, $user ) .
- Xml::openElement( 'table', [ 'id' => 'mw-userrights-table-outer' ] ) .
- "<tr>
- <td class='mw-label'>" .
- Xml::label( $this->msg( 'userrights-reason' )->text(), 'wpReason' ) .
- "</td>
- <td class='mw-input'>" .
- Xml::input( 'user-reason', 60, $this->getRequest()->getVal( 'user-reason', false ),
- [ 'id' => 'wpReason', 'maxlength' => 255 ] ) .
- "</td>
- </tr>
- <tr>
- <td></td>
- <td class='mw-submit'>" .
- Xml::submitButton( $this->msg( 'saveusergroups', $user->getName() )->text(),
- [ 'name' => 'saveusergroups' ] +
- Linker::tooltipAndAccesskeyAttribs( 'userrights-set' )
- ) .
- "</td>
- </tr>" .
- Xml::closeElement( 'table' ) . "\n" .
+ ->rawParams( $userToolLinks )->parse()
+ );
+ if ( $canChangeAny ) {
+ $this->getOutput()->addHTML(
+ $this->msg( 'userrights-groups-help', $user->getName() )->parse() .
+ $grouplist .
+ $groupCheckboxes .
+ Xml::openElement( 'table', [ 'id' => 'mw-userrights-table-outer' ] ) .
+ "<tr>
+ <td class='mw-label'>" .
+ Xml::label( $this->msg( 'userrights-reason' )->text(), 'wpReason' ) .
+ "</td>
+ <td class='mw-input'>" .
+ Xml::input( 'user-reason', 60, $this->getRequest()->getVal( 'user-reason', false ),
+ [ 'id' => 'wpReason', 'maxlength' => 255 ] ) .
+ "</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class='mw-submit'>" .
+ Xml::submitButton( $this->msg( 'saveusergroups', $user->getName() )->text(),
+ [ 'name' => 'saveusergroups' ] +
+ Linker::tooltipAndAccesskeyAttribs( 'userrights-set' )
+ ) .
+ "</td>
+ </tr>" .
+ Xml::closeElement( 'table' ) . "\n"
+ );
+ } else {
+ $this->getOutput()->addHTML( $grouplist );
+ }
+ $this->getOutput()->addHTML(