Skip to content

Commit

Permalink
update permissions for get_url
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Aug 24, 2019
1 parent 2902319 commit fc1ee72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fc1ee72

Please sign in to comment.