diff --git a/src/Plugin/views/field/PublishContentNode.php b/src/Plugin/views/field/PublishContentNode.php
index 87aa5c3..e903907 100644
--- a/src/Plugin/views/field/PublishContentNode.php
+++ b/src/Plugin/views/field/PublishContentNode.php
@@ -8,6 +8,7 @@
 namespace Drupal\Publishcontent\Plugin\Views\field;
 
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\user\Plugin\views\argument_default\CurrentUser;
 use Drupal\views\Plugin\views\field\FieldPluginBase;
 use Drupal\views\ResultRow;
 use Drupal\Core\Url;
@@ -47,11 +48,15 @@ class PublishContentNode extends FieldPluginBase {
    * {@inheritdoc}
    */
   public function render(ResultRow $values) {
-    $id = $values->_entity->id();
-    $url = Url::fromRoute('entity.node.publish', ['node' => $id]);
-    $text = $values->_entity->isPublished() ? $this->t('Unpublish') : $this->t('Publish');
-    $link = Link::fromTextAndUrl($text, $url);
-
-    return $this->getRenderer()->render($link->toRenderable());
+    $permission = \Drupal::service('publishcontent.access');
+    $checkAllow = $permission->access(\Drupal::currentUser(), $values->_entity);
+    if($checkAllow->isAllowed()) {
+      $id = $values->_entity->id();
+      $url = Url::fromRoute('entity.node.publish', ['node' => $id]);
+      $text = $values->_entity->isPublished() ? $this->t('Unpublish') : $this->t('Publish');
+      $link = Link::fromTextAndUrl($text, $url);
+      $render_array = $link->toRenderable();
+      return $this->getRenderer()->render($render_array);
+    }
   }
 }
