mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
- this was only used in the enterprise show view
- the above view was deleted here 4f2389e257
- by removing this, we can remove distributor_link_class method
- it will also fix the rubocop error
16 lines
321 B
Ruby
16 lines
321 B
Ruby
# frozen_string_literal: true
|
|
|
|
module SharedHelper
|
|
def enterprise_user?
|
|
spree_current_user&.enterprises&.count.to_i > 0
|
|
end
|
|
|
|
def admin_user?
|
|
spree_current_user&.has_spree_role? 'admin'
|
|
end
|
|
|
|
def current_shop_products_path
|
|
"#{main_app.enterprise_shop_path(current_distributor)}#/shop_panel"
|
|
end
|
|
end
|