mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
We have only one role, so let's get rid of the unneeded method. Now we are in a better place to get rid of Spree::Role and replace it with a simple boolean.
16 lines
304 B
Ruby
16 lines
304 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&.admin?
|
|
end
|
|
|
|
def current_shop_products_path
|
|
"#{main_app.enterprise_shop_path(current_distributor)}#/shop_panel"
|
|
end
|
|
end
|