Use author_in_programming_group? policy for files & RfCs
* Allow all members of a programming group to list and solve RfCs * Also adjust policy specs to respect programming groups
This commit is contained in:

committed by
Sebastian Serth

parent
9d1be1eeff
commit
01accdae58
@ -124,8 +124,8 @@ class Submission < ApplicationRecord
|
||||
(contributor_id + exercise.created_at.to_i) % 10 == 1
|
||||
end
|
||||
|
||||
def own_unsolved_rfc(user = self.user)
|
||||
Pundit.policy_scope(user, RequestForComment).unsolved.find_by(exercise:, user:)
|
||||
def own_unsolved_rfc(user)
|
||||
Pundit.policy_scope(user, RequestForComment).joins(:submission).where(submission: {contributor:}).unsolved.find_by(exercise:)
|
||||
end
|
||||
|
||||
def unsolved_rfc(user = self.user)
|
||||
|
Reference in New Issue
Block a user