<commit_before>Spree::User.class_eval do
  # The default NilUser has all roles and can access all plugins.
  # Should be overridden in authentication solutions.
  def has_role?(role)
    case
    when role == :superuser
      admin?
    else
      false
    end
  end

  def active_plugins
    @active_plugins ||= Refinery::Plugins.new(
      Refinery::Plugins.registered.select do |plugin|
        has_role?(:superuser)
      end
    )
  end

  def landing_url
    active_plugins.in_menu.first_url_in_menu
  end
end
<commit_msg>Add missing role refinery<commit_after>Spree::User.class_eval do
  # The default NilUser has all roles and can access all plugins.
  # Should be overridden in authentication solutions.
  def has_role?(role)
    case
    when role == :superuser
      admin?
    when role == :refinery
      admin?
    else
      false
    end
  end

  def active_plugins
    @active_plugins ||= Refinery::Plugins.new(
      Refinery::Plugins.registered.select do |plugin|
        has_role?(:superuser)
      end
    )
  end

  def landing_url
    active_plugins.in_menu.first_url_in_menu
  end
end

{'fraction_non_alphanumeric': 0.07207207207207207, 'fraction_numerical': 0.0, 'mean_word_length': 2.8178694158075603, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6097998', 'n_tokens_mistral': 357, 'n_tokens_neox': 348, 'n_words': 97}