Split "suppressrevision" into two user rights
[lhc/web/wiklou.git] / includes / api / ApiQueryRevisions.php
index 3ff6805..582f61e 100644 (file)
@@ -318,7 +318,7 @@ class ApiQueryRevisions extends ApiQueryBase {
                                // Paranoia: avoid brute force searches (bug 17342)
                                if ( !$this->getUser()->isAllowed( 'deletedhistory' ) ) {
                                        $bitmask = Revision::DELETED_USER;
-                               } elseif ( !$this->getUser()->isAllowed( 'suppressrevision' ) ) {
+                               } elseif ( !$this->getUser()->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
                                        $bitmask = Revision::DELETED_USER | Revision::DELETED_RESTRICTED;
                                } else {
                                        $bitmask = 0;