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:
kiragrammel
2023-08-22 09:23:20 +02:00
committed by Sebastian Serth
parent 9d1be1eeff
commit 01accdae58
7 changed files with 101 additions and 19 deletions

View File

@@ -6,7 +6,7 @@ class RequestForCommentPolicy < ApplicationPolicy
end
def show?
admin? || author? || rfc_visibility
admin? || author? || author_in_programming_group? || rfc_visibility
end
def destroy?
@@ -14,11 +14,11 @@ class RequestForCommentPolicy < ApplicationPolicy
end
def mark_as_solved?
admin? || author?
admin? || author? || author_in_programming_group?
end
def set_thank_you_note?
admin? || author?
admin? || author? || author_in_programming_group?
end
def clear_question?