mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Allow DPM feature for specific users
This commit is contained in:
@@ -51,7 +51,7 @@ module Admin
|
||||
|
||||
def dfc_platforms_available?
|
||||
DfcProvider::PlatformsController::PLATFORM_IDS.keys.any? do |id|
|
||||
feature?(id)
|
||||
feature?(id, spree_current_user)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -43,5 +43,11 @@ RSpec.describe Admin::EnterprisesHelper do
|
||||
user.enterprises << enterprise
|
||||
expect(visible_items.pluck(:name)).not_to include "connected_apps"
|
||||
end
|
||||
|
||||
it "shows Connected Apps for specific user" do
|
||||
user.enterprises << enterprise
|
||||
Flipper.enable("cqcm-dev", user)
|
||||
expect(visible_items.pluck(:name)).to include "connected_apps"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user