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
975916d5
Commit
975916d5
authored
Jan 13, 2022
by
Tyler Williams
Committed by
Thong Kuah
Jan 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor: move gitlab_gtm_datalayer flag to before action
parent
c43580ea
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
6 deletions
+15
-6
app/controllers/registrations_controller.rb
app/controllers/registrations_controller.rb
+4
-1
ee/app/controllers/ee/registrations/welcome_controller.rb
ee/app/controllers/ee/registrations/welcome_controller.rb
+4
-1
ee/app/controllers/registrations/projects_controller.rb
ee/app/controllers/registrations/projects_controller.rb
+1
-1
ee/app/controllers/trial_registrations_controller.rb
ee/app/controllers/trial_registrations_controller.rb
+3
-1
ee/app/controllers/trials_controller.rb
ee/app/controllers/trials_controller.rb
+3
-2
No files found.
app/controllers/registrations_controller.rb
View file @
975916d5
...
...
@@ -17,11 +17,14 @@ class RegistrationsController < Devise::RegistrationsController
check_rate_limit!
(
:user_sign_up
,
scope:
request
.
ip
)
if
Feature
.
enabled?
(
:rate_limit_user_sign_up_endpoint
,
default_enabled: :yaml
)
end
before_action
only:
[
:new
]
do
push_frontend_feature_flag
(
:gitlab_gtm_datalayer
,
type: :ops
)
end
feature_category
:authentication_and_authorization
def
new
@resource
=
build_resource
push_frontend_feature_flag
(
:gitlab_gtm_datalayer
,
type: :ops
)
end
def
create
...
...
ee/app/controllers/ee/registrations/welcome_controller.rb
View file @
975916d5
...
...
@@ -23,10 +23,13 @@ module EE
experiment
(
:trial_registration_with_reassurance
,
actor:
current_user
)
.
track
(
:render
,
label:
'registrations:welcome:show'
,
user:
current_user
)
end
before_action
only:
[
:trial_getting_started
]
do
push_frontend_feature_flag
(
:gitlab_gtm_datalayer
,
type: :ops
)
end
end
def
trial_getting_started
push_frontend_feature_flag
(
:gitlab_gtm_datalayer
,
type: :ops
)
render
locals:
{
learn_gitlab_project:
learn_gitlab_project
}
end
...
...
ee/app/controllers/registrations/projects_controller.rb
View file @
975916d5
...
...
@@ -12,13 +12,13 @@ module Registrations
before_action
only:
[
:new
]
do
set_namespace
authorize_create_project!
push_frontend_feature_flag
(
:gitlab_gtm_datalayer
,
type: :ops
)
end
feature_category
:onboarding
def
new
@project
=
Project
.
new
(
namespace:
@namespace
)
push_frontend_feature_flag
(
:gitlab_gtm_datalayer
,
type: :ops
)
end
def
create
...
...
ee/app/controllers/trial_registrations_controller.rb
View file @
975916d5
...
...
@@ -11,9 +11,11 @@ class TrialRegistrationsController < RegistrationsController
before_action
:check_if_gl_com_or_dev
before_action
:set_redirect_url
,
only:
[
:new
]
before_action
only:
[
:new
]
do
push_frontend_feature_flag
(
:gitlab_gtm_datalayer
,
type: :ops
)
end
def
new
push_frontend_feature_flag
(
:gitlab_gtm_datalayer
,
type: :ops
)
end
private
...
...
ee/app/controllers/trials_controller.rb
View file @
975916d5
...
...
@@ -14,19 +14,20 @@ class TrialsController < ApplicationController
before_action
:find_or_create_namespace
,
only: :apply
before_action
:find_namespace
,
only:
[
:extend_reactivate
,
:create_hand_raise_lead
]
before_action
:authenticate_namespace_owner!
,
only:
[
:extend_reactivate
]
before_action
only:
[
:new
,
:select
]
do
push_frontend_feature_flag
(
:gitlab_gtm_datalayer
,
type: :ops
)
end
feature_category
:purchase
def
new
experiment
(
:trial_registration_with_reassurance
,
actor:
current_user
)
.
track
(
:render
,
label:
'trials:new'
,
user:
current_user
)
push_frontend_feature_flag
(
:gitlab_gtm_datalayer
,
type: :ops
)
end
def
select
experiment
(
:trial_registration_with_reassurance
,
actor:
current_user
)
.
track
(
:render
,
label:
'trials:select'
,
user:
current_user
)
push_frontend_feature_flag
(
:gitlab_gtm_datalayer
,
type: :ops
)
end
def
create_lead
...
...
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