Merge pull request #2597 from urbanrotnik/4663-fix-button-visibility

Fix for snapshot creation [SCI-4672]
This commit is contained in:
Alex Kriuchykhin 2020-05-22 16:38:29 +02:00 committed by GitHub
commit b5e0e4649c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,8 @@ class MyModuleRepositorySnapshotsController < ApplicationController
render json: {
html: render_to_string(partial: 'my_modules/repositories/full_view_version',
locals: { repository_snapshot: repository_snapshot })
locals: { repository_snapshot: repository_snapshot,
can_delete_snapshot: can_manage_module?(@my_module) })
}
end
@ -48,7 +49,8 @@ class MyModuleRepositorySnapshotsController < ApplicationController
def show
render json: {
html: render_to_string(partial: 'my_modules/repositories/full_view_version',
locals: { repository_snapshot: @repository_snapshot })
locals: { repository_snapshot: @repository_snapshot,
can_delete_snapshot: can_manage_module?(@my_module) })
}
end