Merge "Add .pipeline/ with dev image variant"
[lhc/web/wiklou.git] / includes / logging / ContentModelLogFormatter.php
index e05357c..23c582c 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
+
 class ContentModelLogFormatter extends LogFormatter {
        protected function getMessageParameters() {
                $lang = $this->context->getLanguage();
@@ -12,7 +14,9 @@ class ContentModelLogFormatter extends LogFormatter {
        public function getActionLinks() {
                if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) // Action is hidden
                        || $this->entry->getSubtype() !== 'change'
-                       || !$this->context->getUser()->isAllowed( 'editcontentmodel' )
+                       || !MediaWikiServices::getInstance()
+                               ->getPermissionManager()
+                               ->userHasRight( $this->context->getUser(), 'editcontentmodel' )
                ) {
                        return '';
                }