From fc1ee7214c22ac5f8f4e32cbdf5c84acc4f899e1 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 24 Aug 2019 08:30:49 +0200 Subject: [PATCH] update permissions for get_url --- app/models/ability.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/ability.rb b/app/models/ability.rb index a09e5ecbd..bef754066 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -29,7 +29,7 @@ def initialize(user) # can [:read, :update], Doi, :provider_id => user.provider_id # end - can [:read, :transfer, :read_landing_page_results], Doi, :provider_id => user.provider_id + can [:read, :get_url, :transfer, :read_landing_page_results], Doi, :provider_id => user.provider_id can [:read], Doi do |doi| doi.findable? end @@ -45,7 +45,7 @@ def initialize(user) can [:read], ProviderPrefix, :provider_id => user.provider_id can [:read], Client, :provider_id => user.provider_id can [:read], ClientPrefix#, :client_id => user.client_id - can [:read, :read_landing_page_results], Doi, :provider_id => user.provider_id + can [:read, :get_url, :read_landing_page_results], Doi, :provider_id => user.provider_id can [:read], Doi do |doi| doi.findable? end @@ -81,7 +81,7 @@ def initialize(user) elsif user.role_id == "client_user" && user.client_id.present? can [:read], Client, :symbol => user.client_id.upcase can [:read], ClientPrefix, :client_id => user.client_id - can [:read, :read_landing_page_results], Doi, :client_id => user.client_id + can [:read, :get_url, :read_landing_page_results], Doi, :client_id => user.client_id can [:read], Doi do |doi| doi.findable? end