}
protected function setupTemplateForOutput() {
-
$request = $this->getRequest();
$user = $this->getUser();
$title = $this->getTitle();
if ( $oldContext ) {
$this->setContext( $oldContext );
}
-
}
/**
* @return array
*/
private function buildContentActionUrls( $content_navigation ) {
-
// content_actions has been replaced with content_navigation for backwards
// compatibility and also for skins that just want simple tabs content_actions
// is now built by flattening the content_navigation arrays into one
if ( !$user->isAnon() ) {
$sur = new UserrightsPage;
$sur->setContext( $this->getContext() );
- if ( $sur->userCanExecute( $this->getUser() ) ) {
- $nav_urls['userrights'] = [
- 'text' => $this->msg( 'tool-link-userrights', $this->getUser()->getName() )->text(),
- 'href' => self::makeSpecialUrlSubpage( 'Userrights', $rootUser )
- ];
- }
+ $canChange = $sur->userCanChangeRights( $this->getUser(), false );
+ $nav_urls['userrights'] = [
+ 'text' => $this->msg(
+ $canChange ? 'tool-link-userrights' : 'tool-link-userrights-readonly',
+ $this->getUser()->getName()
+ )->text(),
+ 'href' => self::makeSpecialUrlSubpage( 'Userrights', $rootUser )
+ ];
}
}