* (bug 12790) Page protection is not logged when edit-protection is used and move-protection is not
* (bug 12793) Fix for restricted namespaces/pages in Special:Export
* Fix for Special:Export so it doesn't ignore the page named '0'
-
+* Don't display rollback link if the user doesn't have all required permissions
== Parser changes in 1.12 ==
$tools = array();
if ( !is_null( $next ) && is_object( $next ) ) {
- if( $wgUser->isAllowed( 'rollback' ) && $latest ) {
+ if( !$this->mTitle->getUserPermissionsErrors( 'rollback', $wgUser )
+ && !$this->mTitle->getUserPermissionsErrors( 'edit', $wgUser )
+ && $latest ) {
$tools[] = '<span class="mw-rollback-link">'
. $this->mSkin->buildRollbackLink( $rev )
. '</span>';
* Generates each row in the contributions list.
*
* Contributions which are marked "top" are currently on top of the history.
- * For these contributions, a [rollback] link is shown for users with sysop
- * privileges. The rollback link restores the most recent version that was not
- * written by the target user.
+ * For these contributions, a [rollback] link is shown for users with roll-
+ * back privileges. The rollback link restores the most recent version that
+ * was not written by the target user.
*
* @todo This would probably look a lot nicer in a table.
*/
$difftext .= $this->messages['newarticle'];
}
- if( $wgUser->isAllowed( 'rollback' ) ) {
+ if( !$page->getUserPermissionsErrors( 'rollback', $wgUser )
+ && !$page->getUserPermissionsErrors( 'edit', $wgUser ) ) {
$topmarktext .= ' '.$sk->generateRollback( $rev );
}