Commit 6990ae44 authored by Gualter's avatar Gualter

Remove subcategories matching on reviewers ability (#213)

parent f6bde1b3
......@@ -93,19 +93,13 @@ class Ability
# Submitters can read events they are involved in
# Can read events of the subcategory that they have submitted an individual paper in
can :read, Event do |event| or
if @user.person.submitted_individual_paper_in?(@conference)
can :reserve_for_peer_review, Event do |event|
@user.person.submitted_individual_paper_in?(@conference) and # has submitted individual paper in the conference
event.event_type == 'Individual Paper' and # Is Individual Paper
event.conference == @conference and # Is in the correct conference and # Is of the right subcategory
not event.review_reservations.where(person: @user.person).any? and # Has not already been reserved by user
not event.event_ratings.where(person: @user.person).any? and # Has not already reviewed
(event.ratings_by_submitters + event.peer_review_reservations_count) < 2 and # has neither 2 reviews by peers, nor 2 reservations, nor 1 review 1 reservation
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment