How can I restrict access to actions on 'history', 'view source' and 'discussion' for anonymous users? Also, of course, I would like to hide approprite tabs! Thanks!
Hi
You can do that in the Skin (for example: /mediawiki/skins/MonoBook.php) with this, an anonymous user will not see the viewsource- and history-tabs.
<?php global $wgUser; if( $wgUser->isAnon() ) { ?> <style> #ca-viewsource { display: none !important; } #ca-history { display: none !important; }
</style>
Андрій Гончар schrieb:
How can I restrict access to actions on 'history', 'view source' and 'discussion' for anonymous users? Also, of course, I would like to hide approprite tabs! Thanks! _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Good solution, but if someone know url to history, he still can gets access there
We use the Lockdown-Extension:
You can define user-rights for different pages in the LocalSettings with it - examples:
$wgSpecialPageLockdown['Version'] = array('bureaucrat', 'sysop'); $wgSpecialPageLockdown['Export'] = array('user', 'bureaucrat', 'sysop'); $wgActionLockdown['history'] = array('user', 'bureaucrat', 'sysop');
hope this helps.
Андрій Гончар schrieb:
Good solution, but if someone know url to history, he still can gets access there _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Irene Eglin wrote:
Hi
You can do that in the Skin (for example: /mediawiki/skins/MonoBook.php) with this, an anonymous user will not see the viewsource- and history-tabs.
<?php global $wgUser; if( $wgUser->isAnon() ) { ?> <style> #ca-viewsource { display: none !important; } #ca-history { display: none !important; } </style>
If you are going hide with CSS, use MediaWiki:Common.css, don't patch the code for that! (an yes, use Lockdown for protecting the real actions)
mediawiki-l@lists.wikimedia.org