--- a/gin_toolbar.module +++ b/gin_toolbar.module @@ -621,6 +621,10 @@ else { $gin_activated = array_key_exists('gin', $frontend_base_themes); } + + // Allow other modules to override the computed activation state, e.g. + // to exempt specific users from the Gin toolbar. + \Drupal::moduleHandler()->alter('gin_toolbar_is_active', $gin_activated); } } return $gin_activated;