diff options
| author | Francisco Javier López <fjlopez@gitlab.com> | 2018-04-06 15:23:49 +0000 |
|---|---|---|
| committer | Douwe Maan <douwe@gitlab.com> | 2018-04-06 15:23:49 +0000 |
| commit | f20912df033d07c46b0989012244d96d0a12b66d (patch) | |
| tree | 6207b8face17f9b7166ba1a5e047032e3927e53e /app/models | |
| parent | 44f4a674e2a87d104f700265d835aba000c589f0 (diff) | |
| download | gitlab-ce-f20912df033d07c46b0989012244d96d0a12b66d.tar.gz | |
Extend API for importing a project export with overwrite support
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/group.rb | 4 | ||||
| -rw-r--r-- | app/models/namespace.rb | 4 | ||||
| -rw-r--r-- | app/models/project.rb | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index 3cfe21ac93b..8ff781059cc 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -286,6 +286,10 @@ class Group < Namespace false end + def refresh_project_authorizations + refresh_members_authorized_projects(blocking: false) + end + private def update_two_factor_requirement diff --git a/app/models/namespace.rb b/app/models/namespace.rb index e350b675639..2b63aa33222 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -252,6 +252,10 @@ class Namespace < ActiveRecord::Base [] end + def refresh_project_authorizations + owner.refresh_authorized_projects + end + private def path_or_parent_changed? diff --git a/app/models/project.rb b/app/models/project.rb index 1b29cbf28d2..96907f3b23d 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1472,7 +1472,9 @@ class Project < ActiveRecord::Base end def rename_repo_notify! - send_move_instructions(full_path_was) + # When we import a project overwriting the original project, there + # is a move operation. In that case we don't want to send the instructions. + send_move_instructions(full_path_was) unless started? expires_full_path_cache self.old_path_with_namespace = full_path_was |
