Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
a13e7dca823b
Commit
a13e7dca
authored
Mar 15, 2019
by
Kamil Trzciński
Browse files
Make runners token encryption to be optional
parent
6e52a4049ddc
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/models/application_setting.rb
View file @
a13e7dca
...
...
@@ -7,7 +7,7 @@
include
IgnorableColumn
include
ChronicDurationAttribute
add_authentication_token_field
:runners_registration_token
,
encrypted:
->
{
Feature
.
enabled?
(
:application_settings_tokens_optional_encryption
)
?
:optional
:
:required
}
add_authentication_token_field
:runners_registration_token
,
encrypted:
->
{
Feature
.
enabled?
(
:application_settings_tokens_optional_encryption
,
default_enabled:
true
)
?
:optional
:
:required
}
add_authentication_token_field
:health_check_access_token
DOMAIN_LIST_SEPARATOR
=
%r{
\s
*[,;]
\s
* # comma or semicolon, optionally surrounded by whitespace
...
...
app/models/ci/runner.rb
View file @
a13e7dca
...
...
@@ -10,7 +10,7 @@
include
FromUnion
include
TokenAuthenticatable
add_authentication_token_field
:token
,
encrypted:
->
{
Feature
.
enabled?
(
:ci_runners_tokens_optional_encryption
)
?
:optional
:
:required
}
add_authentication_token_field
:token
,
encrypted:
->
{
Feature
.
enabled?
(
:ci_runners_tokens_optional_encryption
,
default_enabled:
true
)
?
:optional
:
:required
}
enum
access_level:
{
not_protected:
0
,
...
...
app/models/group.rb
View file @
a13e7dca
...
...
@@ -56,7 +56,7 @@
validates
:two_factor_grace_period
,
presence:
true
,
numericality:
{
greater_than_or_equal_to:
0
}
add_authentication_token_field
:runners_token
,
encrypted:
->
{
Feature
.
enabled?
(
:groups_tokens_optional_encryption
)
?
:optional
:
:required
}
add_authentication_token_field
:runners_token
,
encrypted:
->
{
Feature
.
enabled?
(
:groups_tokens_optional_encryption
,
default_enabled:
true
)
?
:optional
:
:required
}
after_create
:post_create_hook
after_destroy
:post_destroy_hook
...
...
app/models/project.rb
View file @
a13e7dca
...
...
@@ -84,7 +84,7 @@
default_value_for
:snippets_enabled
,
gitlab_config_features
.
snippets
default_value_for
:only_allow_merge_if_all_discussions_are_resolved
,
false
add_authentication_token_field
:runners_token
,
encrypted:
->
{
Feature
.
enabled?
(
:projects_tokens_optional_encryption
)
?
:optional
:
:required
}
add_authentication_token_field
:runners_token
,
encrypted:
->
{
Feature
.
enabled?
(
:projects_tokens_optional_encryption
,
default_enabled:
true
)
?
:optional
:
:required
}
before_validation
:mark_remote_mirrors_for_removal
,
if:
->
{
RemoteMirror
.
table_exists?
}
...
...
Write
Preview
Supports
Markdown
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