diff options
Diffstat (limited to 'app/services/groups/import_export')
-rw-r--r-- | app/services/groups/import_export/export_service.rb | 6 |
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 |