Upstream sync

This commit is contained in:
Senad Uka
2020-06-19 09:23:07 +02:00
parent 988ef2beab
commit b924b99762
25 changed files with 452 additions and 44 deletions

View File

@@ -48,8 +48,10 @@ class ContractsController < ApplicationController
# Native release contracts must be generated on-the-fly; non-native releases have a contract attachment
if releasable.native?
send_file contract.to_pdf, download_attributes
else
elsif policy(contract).show?
redirect_to releasable.contract.service_url
else
raise Pundit::NotAuthorizedError
end
end
end