debian-mirror-gitlab/db/fixtures/development/28_integrations.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
924 B
Ruby
Raw Permalink Normal View History

2020-10-24 23:57:45 +05:30
# frozen_string_literal: true
Gitlab::Seeder.quiet do
# This is only enabled if you're going to be using the customer portal in
# development.
2023-06-20 00:43:36 +05:30
# CUSTOMER_PORTAL_URL=http://localhost:5000 FILTER=integrations rake db:seed_fu
2020-10-24 23:57:45 +05:30
flag = 'CUSTOMER_PORTAL_URL'
if ENV[flag]
ApplicationSetting.current_without_cache.update!(check_namespace_plan: true)
print '.'
Doorkeeper::Application.create!(
name: 'Customer Portal Development',
uid: '28cc28f03b415fbc737a7364dc06af0adf12688e1b0c6669baf6850a6855132b',
secret: '74c96596ec3f82dd137dd5775f31eba919f77b0a3114611f0411d148d727c64c',
redirect_uri: "#{ENV['CUSTOMER_PORTAL_URL']}/auth/gitlab/callback",
scopes: 'api read_user openid',
trusted: true,
confidential: true
)
print '.'
else
puts "Skipped. To enable, set the `#{flag}` environment variable to your development customer's portal url."
end
end