diff --git a/toolbar_anti_flicker/toolbar_anti_flicker.module b/toolbar_anti_flicker/toolbar_anti_flicker.module
index 89400ce..03c6af2 100644
--- a/toolbar_anti_flicker/toolbar_anti_flicker.module
+++ b/toolbar_anti_flicker/toolbar_anti_flicker.module
@@ -7,8 +7,10 @@ function toolbar_anti_flicker_page_attachments_alter(array &$page) {
 }
 
 function toolbar_anti_flicker_preprocess_html(&$variables) {
-
-  $attributes = array();
-  $attributes['class'] = 'toolbar-no-flickering';
-  $variables['html_attributes'] = new Attribute($attributes);
+  $user = \Drupal::currentUser();
+  if ($user->hasPermission('access toolbar')) {
+    $attributes = [];
+    $attributes['class'] = 'toolbar-no-flickering';
+    $variables['html_attributes'] = new Attribute($attributes);
+  }
 }
