Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-24 00:08:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-24 00:08:35 +0300
commit24256212ea84e6fb6509f6fb317a2d2bac3d0d06 (patch)
treee4300d70d8e724179d9de657a68d88462aaaf04a /app/services/groups/import_export
parentd933bc5a8738d24898c5a82cc72ee9bd050425e6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/groups/import_export')
-rw-r--r--app/services/groups/import_export/export_service.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/services/groups/import_export/export_service.rb b/app/services/groups/import_export/export_service.rb
index 26886fc67dc..2c3975961a8 100644
--- a/app/services/groups/import_export/export_service.rb
+++ b/app/services/groups/import_export/export_service.rb
@@ -11,6 +11,12 @@ module Groups
end
def execute
+ unless @current_user.can?(:admin_group, @group)
+ raise ::Gitlab::ImportExport::Error.new(
+ "User with ID: %s does not have permission to Group %s with ID: %s." %
+ [@current_user.id, @group.name, @group.id])
+ end
+
save!
end