diff options
Diffstat (limited to 'app/graphql/mutations/release_asset_links')
-rw-r--r-- | app/graphql/mutations/release_asset_links/create.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/graphql/mutations/release_asset_links/create.rb b/app/graphql/mutations/release_asset_links/create.rb index 02704efb47c..ff9d98d2c0f 100644 --- a/app/graphql/mutations/release_asset_links/create.rb +++ b/app/graphql/mutations/release_asset_links/create.rb @@ -33,6 +33,10 @@ module Mutations return { link: nil, errors: [message] } end + unless Ability.allowed?(current_user, :update_release, release) + raise_resource_not_available_error! + end + new_link = release.links.create(link_attrs) unless new_link.persisted? |