mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
21 lines
351 B
Ruby
21 lines
351 B
Ruby
# Tells whether a particular feature is enabled or not
|
|
class FeatureFlags
|
|
# Constructor
|
|
#
|
|
# @param user [User]
|
|
def initialize(user)
|
|
@user = user
|
|
end
|
|
|
|
# Checks whether product import is enabled for the specified user
|
|
#
|
|
# @return [Boolean]
|
|
def product_import_enabled?
|
|
user.superadmin?
|
|
end
|
|
|
|
private
|
|
|
|
attr_reader :user
|
|
end
|