rfc can now be solved.
show.html still needs to be finished
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
class RequestForCommentPolicy < ApplicationPolicy
|
||||
|
||||
def author?
|
||||
@user == @record.author
|
||||
end
|
||||
private :author?
|
||||
|
||||
def create?
|
||||
everyone
|
||||
@@ -13,6 +16,10 @@ class RequestForCommentPolicy < ApplicationPolicy
|
||||
define_method(action) { admin? }
|
||||
end
|
||||
|
||||
def mark_as_solved?
|
||||
admin? || author?
|
||||
end
|
||||
|
||||
def edit?
|
||||
admin?
|
||||
end
|
||||
|
Reference in New Issue
Block a user