Skip to content

Commit

Permalink
syntax fix. #303
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jul 5, 2019
1 parent 097ba72 commit 38360ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def initialize(user)
if user.role_id == "staff_admin"
can :manage, :all
cannot [:new, :create], Doi do |doi|
doi.client.blank? || !(doi.client.prefixes.where(prefix: doi.prefix).first || doi.client.symbol.downcase.start_with?("crossref.") || doi.client.symbol.downcase.start_with?("medra.")
doi.client.blank? || !(doi.client.prefixes.where(prefix: doi.prefix).first || doi.client.symbol.downcase.start_with?("crossref.") || doi.client.symbol.downcase.start_with?("medra."))
end
elsif user.role_id == "staff_user"
can :read, :all
Expand Down

0 comments on commit 38360ee

Please sign in to comment.