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
6c5aabd7
Commit
6c5aabd7
authored
Aug 08, 2019
by
Aishwarya Subramanian
Committed by
Clement Ho
Aug 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handling abuse of repeat trial in self managed
Passes email ID of the current user as a query parameter.
parent
fa60b009
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
2 deletions
+43
-2
app/assets/stylesheets/framework/callout.scss
app/assets/stylesheets/framework/callout.scss
+7
-1
ee/app/helpers/license_helper.rb
ee/app/helpers/license_helper.rb
+1
-1
ee/app/views/admin/licenses/_repeat_trial_info.html.haml
ee/app/views/admin/licenses/_repeat_trial_info.html.haml
+9
-0
ee/app/views/admin/licenses/missing.html.haml
ee/app/views/admin/licenses/missing.html.haml
+2
-0
ee/changelogs/unreleased/multiple-trials.yml
ee/changelogs/unreleased/multiple-trials.yml
+5
-0
ee/spec/features/admin/licenses/admin_uploads_license_spec.rb
...pec/features/admin/licenses/admin_uploads_license_spec.rb
+13
-0
locale/gitlab.pot
locale/gitlab.pot
+6
-0
No files found.
app/assets/stylesheets/framework/callout.scss
View file @
6c5aabd7
...
...
@@ -9,7 +9,9 @@
.bs-callout
{
margin
:
$gl-padding
0
;
padding
:
$gl-padding
;
border-left
:
3px
solid
$border-color
;
border-color
:
$border-color
;
border-style
:
solid
;
border-width
:
0
0
0
3px
;
color
:
$text-color
;
background
:
$gray-light
;
...
...
@@ -48,6 +50,10 @@
background-color
:
$blue-100
;
border-color
:
$blue-200
;
color
:
$blue-700
;
h4
{
color
:
$blue-700
;
}
}
.bs-callout-success
{
...
...
ee/app/helpers/license_helper.rb
View file @
6c5aabd7
...
...
@@ -85,7 +85,7 @@ module LicenseHelper
return_to_url
=
CGI
.
escape
(
Gitlab
.
config
.
gitlab
.
url
)
uri
=
URI
.
parse
(
::
EE
::
SUBSCRIPTIONS_URL
)
uri
.
path
=
'/trials/new'
uri
.
query
=
"return_to=
#{
return_to_url
}
"
uri
.
query
=
"return_to=
#{
return_to_url
}
&id=
#{
Base64
.
strict_encode64
(
current_user
.
email
)
}
"
uri
.
to_s
end
...
...
ee/app/views/admin/licenses/_repeat_trial_info.html.haml
0 → 100644
View file @
6c5aabd7
#repeat-trial-info
.bs-callout.bs-callout-info.alert.alert-dismissible.fade.in.show
{
role:
"alert"
}
%button
.close
{
type:
"button"
,
'data-dismiss'
:
"alert"
,
'aria-label'
:
"Close"
}
%span
=
sprite_icon
(
'close'
,
size:
16
)
%h4
=
_
(
'Free Trial'
)
%p
=
_
(
'Thank you for signing up for your free trial! You will get additional instructions in your inbox shortly.'
)
ee/app/views/admin/licenses/missing.html.haml
View file @
6c5aabd7
...
...
@@ -7,6 +7,8 @@
=
render
"upload_trial_license"
%hr
-
if
params
.
key?
(
:trial_key
)
&&
params
[
:trial_key
].
blank?
=
render
"repeat_trial_info"
.container.blank-state-container
.text-center
...
...
ee/changelogs/unreleased/multiple-trials.yml
0 → 100644
View file @
6c5aabd7
---
title
:
Handling use case for repeat trial
merge_request
:
14714
author
:
type
:
fixed
ee/spec/features/admin/licenses/admin_uploads_license_spec.rb
View file @
6c5aabd7
...
...
@@ -28,6 +28,19 @@ describe "Admin uploads license" do
end
end
context
"when license key is not provided in the query string, as it is a repeat trial"
do
before
do
License
.
destroy_all
# rubocop: disable DestroyAll
visit
(
admin_license_path
(
trial_key:
""
))
end
it
"shows an info banner for repeat trial"
do
expect
(
page
).
to
have_selector
(
'div#repeat-trial-info'
)
expect
(
page
).
to
have_selector
(
'div.bs-callout-info'
)
end
end
context
"uploading license"
do
before
do
visit
(
new_admin_license_path
)
...
...
locale/gitlab.pot
View file @
6c5aabd7
...
...
@@ -6466,6 +6466,9 @@ msgstr ""
msgid "Found errors in your .gitlab-ci.yml:"
msgstr ""
msgid "Free Trial"
msgstr ""
msgid "Free Trial of GitLab.com Gold"
msgstr ""
...
...
@@ -14357,6 +14360,9 @@ msgstr ""
msgid "TestHooks|Ensure the wiki is enabled and has pages."
msgstr ""
msgid "Thank you for signing up for your free trial! You will get additional instructions in your inbox shortly."
msgstr ""
msgid "Thank you for your report. A GitLab administrator will look into it shortly."
msgstr ""
...
...
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