Skip to content

Commit cc1ca4f

Browse files
committed
Rename default docker user const
* the name default is a bit confusing now that it conditionally depends on configuration
1 parent 44e4a58 commit cc1ca4f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/models/runtime/app_model.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class AppModel < Sequel::Model(:apps)
88
include Serializer
99
APP_NAME_REGEX = /\A[[:alnum:][:punct:][:print:]]+\Z/
1010
DEFAULT_CONTAINER_USER = 'vcap'.freeze
11-
DEFAULT_DOCKER_CONTAINER_USER = 'root'.freeze
11+
DOCKER_CONTAINER_ROOT_USER = 'root'.freeze
1212

1313
many_to_many :routes, join_table: :route_mappings, left_key: :app_guid, left_primary_key: :guid, right_primary_key: :guid, right_key: :route_guid
1414
one_to_many :route_mappings, class: 'VCAP::CloudController::RouteMappingModel', key: :app_guid, primary_key: :guid

app/models/runtime/droplet_model.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def docker_user
138138
end
139139
end
140140

141-
container_user.presence || (Config.config.get(:allow_process_root_user) ? AppModel::DEFAULT_DOCKER_CONTAINER_USER : AppModel::DEFAULT_CONTAINER_USER)
141+
container_user.presence || (Config.config.get(:allow_process_root_user) ? AppModel::DOCKER_CONTAINER_ROOT_USER : AppModel::DEFAULT_CONTAINER_USER)
142142
end
143143

144144
def staging?

app/models/runtime/process_model.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ def permitted_users
576576
end
577577

578578
def docker_run_action_user
579-
actual_droplet&.docker_user.presence || (Config.config.get(:allow_process_root_user) ? AppModel::DEFAULT_DOCKER_CONTAINER_USER : AppModel::DEFAULT_CONTAINER_USER)
579+
actual_droplet&.docker_user.presence || (Config.config.get(:allow_process_root_user) ? AppModel::DOCKER_CONTAINER_ROOT_USER : AppModel::DEFAULT_CONTAINER_USER)
580580
end
581581

582582
def non_unique_process_types

0 commit comments

Comments
 (0)