| ... | @@ -4,6 +4,12 @@ module Projects |
... | @@ -4,6 +4,12 @@ module Projects |
|
|
module ImportExport
|
|
module ImportExport
|
|
|
class ExportService < BaseService
|
|
class ExportService < BaseService
|
|
|
def execute(after_export_strategy = nil, options = {})
|
|
def execute(after_export_strategy = nil, options = {})
|
|
|
|
unless project.template_source? || can?(current_user, :admin_project, project)
|
|
|
|
raise ::Gitlab::ImportExport::Error.new(
|
|
|
|
"User with ID: %s does not have permission to Project %s with ID: %s." %
|
|
|
|
[current_user.id, project.name, project.id])
|
|
|
|
end
|
|
|
|
|
|
|
@shared = project.import_export_shared
|
|
@shared = project.import_export_shared
|
|
|
|
|
|
|
|
save_all!
|
|
save_all!
|
| ... | |
... | |
| ... | | ... | |