diff options
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/concerns/users/participable_service.rb | 3 | ||||
-rw-r--r-- | app/services/packages/create_event_service.rb | 2 | ||||
-rw-r--r-- | app/services/projects/transfer_service.rb | 16 |
3 files changed, 14 insertions, 7 deletions
diff --git a/app/services/concerns/users/participable_service.rb b/app/services/concerns/users/participable_service.rb index fac8e91d216..4f4032e77b9 100644 --- a/app/services/concerns/users/participable_service.rb +++ b/app/services/concerns/users/participable_service.rb @@ -46,8 +46,9 @@ module Users username: user.username, name: user.name, avatar_url: user.avatar_url, - availability: user&.status&.availability + availability: nil } + # Return nil for availability for now due to https://gitlab.com/gitlab-org/gitlab/-/issues/285442 end def group_as_hash(group, group_counts) diff --git a/app/services/packages/create_event_service.rb b/app/services/packages/create_event_service.rb index 8350ff993bf..c4492389da9 100644 --- a/app/services/packages/create_event_service.rb +++ b/app/services/packages/create_event_service.rb @@ -7,7 +7,7 @@ module Packages ::Gitlab::UsageDataCounters::HLLRedisCounter.track_event(current_user.id, redis_event_name) end - if Feature.enabled?(:collect_package_events) + if Feature.enabled?(:collect_package_events) && Gitlab::Database.read_write? ::Packages::Event.create!( event_type: event_name, originator: current_user&.id, diff --git a/app/services/projects/transfer_service.rb b/app/services/projects/transfer_service.rb index 5743efab81b..5178c76f0fc 100644 --- a/app/services/projects/transfer_service.rb +++ b/app/services/projects/transfer_service.rb @@ -71,7 +71,10 @@ module Projects Project.transaction do project.expire_caches_before_rename(@old_path) + # Apply changes to the project update_namespace_and_visibility(@new_namespace) + update_shared_runners_settings + project.save! # Notifications project.send_move_instructions(@old_path) @@ -84,10 +87,6 @@ module Projects # Move uploads move_project_uploads(project) - # If a project is being transferred to another group it means it can already - # have shared runners enabled but we need to check whether the new group allows that. - project.shared_runners_enabled = false if project.group && project.group.shared_runners_setting == 'disabled_and_unoverridable' - project.old_path_with_namespace = @old_path update_repository_configuration(@new_path) @@ -120,7 +119,6 @@ module Projects # Apply new namespace id and visibility level project.namespace = to_namespace project.visibility_level = to_namespace.visibility_level unless project.visibility_level_allowed_by_group? - project.save! end def update_repository_configuration(full_path) @@ -208,6 +206,14 @@ module Projects def new_design_repo_path "#{new_path}#{::Gitlab::GlRepository::DESIGN.path_suffix}" end + + def update_shared_runners_settings + # If a project is being transferred to another group it means it can already + # have shared runners enabled but we need to check whether the new group allows that. + if project.group && project.group.shared_runners_setting == 'disabled_and_unoverridable' + project.shared_runners_enabled = false + end + end end end |