8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'app/models/concerns/curate/ability.rb', line 8
def curate_permissions
alias_action :confirm, :copy, :to => :update
if current_user.manager?
can [:discover, :show, :read, :edit, :update, :destroy], :all
end
can :edit, Person do |p|
p.pid == current_user.repository_id
end
can [:show, :read, :update, :destroy], [Curate.configuration.curation_concerns] do |w|
u = ::User.find_by_user_key(w.owner)
u && u.can_receive_deposits_from.include?(current_user)
end
end
|