Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9766c90e
Commit
9766c90e
authored
Dec 12, 2019
by
Alper Akgun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove feature flag for new trial signup
We enable the trial signup on gitlab.com forever
parent
e9350d05
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
14 additions
and
71 deletions
+14
-71
ee/app/controllers/trial_registrations_controller.rb
ee/app/controllers/trial_registrations_controller.rb
+0
-7
ee/app/controllers/trials_controller.rb
ee/app/controllers/trials_controller.rb
+0
-5
ee/app/helpers/ee/users_helper.rb
ee/app/helpers/ee/users_helper.rb
+0
-1
ee/changelogs/unreleased/36525-remove-feature-flag-for-new-trial-sign-up-flow.yml
.../36525-remove-feature-flag-for-new-trial-sign-up-flow.yml
+5
-0
ee/spec/controllers/trial_registrations_controller_spec.rb
ee/spec/controllers/trial_registrations_controller_spec.rb
+0
-25
ee/spec/controllers/trials_controller_spec.rb
ee/spec/controllers/trials_controller_spec.rb
+0
-11
ee/spec/features/trial_registrations/signin_spec.rb
ee/spec/features/trial_registrations/signin_spec.rb
+0
-1
ee/spec/features/trial_registrations/signup_spec.rb
ee/spec/features/trial_registrations/signup_spec.rb
+0
-1
ee/spec/features/trials/capture_lead_spec.rb
ee/spec/features/trials/capture_lead_spec.rb
+0
-1
ee/spec/features/trials/select_namespace_spec.rb
ee/spec/features/trials/select_namespace_spec.rb
+0
-1
ee/spec/helpers/users_helper_spec.rb
ee/spec/helpers/users_helper_spec.rb
+9
-18
No files found.
ee/app/controllers/trial_registrations_controller.rb
View file @
9766c90e
...
...
@@ -8,7 +8,6 @@ class TrialRegistrationsController < RegistrationsController
skip_before_action
:require_no_authentication
before_action
:check_if_gl_com
before_action
:check_if_improved_trials_enabled
before_action
:set_redirect_url
,
only:
[
:new
]
before_action
:skip_confirmation
,
only:
[
:create
]
...
...
@@ -41,10 +40,4 @@ class TrialRegistrationsController < RegistrationsController
def
resource
@resource
||=
Users
::
BuildService
.
new
(
current_user
,
sign_up_params
).
execute
(
skip_authorization:
true
)
end
def
check_if_improved_trials_enabled
unless
Feature
.
enabled?
(
:improved_trial_signup
)
redirect_to
(
"
#{
EE
::
SUBSCRIPTIONS_URL
}
/trials/new?gl_com=true"
)
end
end
end
ee/app/controllers/trials_controller.rb
View file @
9766c90e
...
...
@@ -6,7 +6,6 @@ class TrialsController < ApplicationController
layout
'trial'
before_action
:check_if_gl_com
before_action
:check_if_improved_trials_enabled
before_action
:authenticate_user!
before_action
:find_or_create_namespace
,
only: :apply
...
...
@@ -63,10 +62,6 @@ class TrialsController < ApplicationController
attrs
end
def
check_if_improved_trials_enabled
render_404
unless
Feature
.
enabled?
(
:improved_trial_signup
)
end
def
apply_trial_params
gl_com_params
=
{
gitlab_com_trial:
true
,
sync_to_gl:
true
}
...
...
ee/app/helpers/ee/users_helper.rb
View file @
9766c90e
...
...
@@ -15,7 +15,6 @@ module EE
def
trials_allowed?
(
user
)
return
unless
user
return
unless
::
Gitlab
.
com?
return
unless
::
Feature
.
enabled?
(
:improved_trial_signup
)
user
.
any_namespace_without_trial?
end
...
...
ee/changelogs/unreleased/36525-remove-feature-flag-for-new-trial-sign-up-flow.yml
0 → 100644
View file @
9766c90e
---
title
:
Improved trials sign up for gitlab.com
merge_request
:
21650
author
:
type
:
added
ee/spec/controllers/trial_registrations_controller_spec.rb
View file @
9766c90e
...
...
@@ -10,18 +10,6 @@ describe TrialRegistrationsController do
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
end
context
'when feature is turned off'
do
before
do
stub_feature_flags
(
improved_trial_signup:
false
)
end
it
'redirects to subscription portal trial url'
do
get
:new
expect
(
response
).
to
redirect_to
(
"
#{
EE
::
SUBSCRIPTIONS_URL
}
/trials/new?gl_com=true"
)
end
end
context
'when customer is authenticated'
do
before
do
sign_in
(
user
)
...
...
@@ -70,19 +58,6 @@ describe TrialRegistrationsController do
end
end
context
'when feature is turned off'
do
before
do
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
stub_feature_flags
(
improved_trial_signup:
false
)
end
it
'returns not found'
do
post
:create
,
params:
{
user:
user_params
}
expect
(
response
).
to
redirect_to
(
"
#{
EE
::
SUBSCRIPTIONS_URL
}
/trials/new?gl_com=true"
)
end
end
context
'when valid'
do
before
do
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
...
...
ee/spec/controllers/trials_controller_spec.rb
View file @
9766c90e
...
...
@@ -13,7 +13,6 @@ describe TrialsController do
before
do
allow
(
::
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
stub_feature_flags
(
improved_trial_signup:
true
)
end
describe
'#new'
do
...
...
@@ -28,16 +27,6 @@ describe TrialsController do
expect
(
response
.
status
).
to
eq
(
404
)
end
end
context
'when feature is turned off'
do
it
'returns 404 not found'
do
stub_feature_flags
(
improved_trial_signup:
false
)
get
:new
expect
(
response
.
status
).
to
eq
(
404
)
end
end
end
describe
'#create_lead'
do
...
...
ee/spec/features/trial_registrations/signin_spec.rb
View file @
9766c90e
...
...
@@ -7,7 +7,6 @@ describe 'Trial Sign In' do
describe
'on GitLab.com'
do
before
do
stub_feature_flags
(
improved_trial_signup:
true
)
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
).
at_least
(
:once
)
end
...
...
ee/spec/features/trial_registrations/signup_spec.rb
View file @
9766c90e
...
...
@@ -7,7 +7,6 @@ describe 'Trial Sign Up', :js do
describe
'on GitLab.com'
do
before
do
stub_feature_flags
(
improved_trial_signup:
true
)
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
).
at_least
(
:once
)
end
...
...
ee/spec/features/trials/capture_lead_spec.rb
View file @
9766c90e
...
...
@@ -7,7 +7,6 @@ describe 'Trial Capture Lead', :js do
let
(
:user
)
{
create
(
:user
)
}
before
do
stub_feature_flags
(
improved_trial_signup:
true
)
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
).
at_least
(
:once
)
sign_in
(
user
)
end
...
...
ee/spec/features/trials/select_namespace_spec.rb
View file @
9766c90e
...
...
@@ -9,7 +9,6 @@ describe 'Trial Select Namespace', :js do
let
(
:user
)
{
create
(
:user
)
}
before
do
stub_feature_flags
(
improved_trial_signup:
true
)
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
).
at_least
(
:once
)
sign_in
(
user
)
end
...
...
ee/spec/helpers/users_helper_spec.rb
View file @
9766c90e
...
...
@@ -9,23 +9,15 @@ describe UsersHelper do
subject
(
:items
)
{
helper
.
current_user_menu_items
}
where
(
:user?
,
:gitlab_com?
,
:improved_trial_signup_feature_enabled?
,
:user_eligible?
,
:should_include_start_trial?
)
do
true
|
true
|
true
|
true
|
true
true
|
true
|
true
|
false
|
false
true
|
true
|
false
|
true
|
false
true
|
true
|
false
|
false
|
false
true
|
false
|
true
|
true
|
false
true
|
false
|
true
|
false
|
false
true
|
false
|
false
|
true
|
false
true
|
false
|
false
|
false
|
false
false
|
true
|
true
|
true
|
false
false
|
true
|
true
|
false
|
false
false
|
true
|
false
|
true
|
false
false
|
true
|
false
|
false
|
false
false
|
false
|
true
|
true
|
false
false
|
false
|
true
|
false
|
false
false
|
false
|
false
|
true
|
false
false
|
false
|
false
|
false
|
false
where
(
:user?
,
:gitlab_com?
,
:user_eligible?
,
:should_include_start_trial?
)
do
true
|
true
|
true
|
true
true
|
true
|
false
|
false
true
|
false
|
true
|
false
true
|
false
|
false
|
false
false
|
true
|
true
|
false
false
|
true
|
false
|
false
false
|
false
|
true
|
false
false
|
false
|
false
|
false
end
with_them
do
...
...
@@ -34,7 +26,6 @@ describe UsersHelper do
allow
(
helper
).
to
receive
(
:can?
).
and_return
(
false
)
allow
(
::
Gitlab
).
to
receive
(
:com?
)
{
gitlab_com?
}
stub_feature_flags
(
improved_trial_signup:
improved_trial_signup_feature_enabled?
)
allow
(
user
).
to
receive
(
:any_namespace_without_trial?
)
{
user_eligible?
}
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment