bugfixes, policies, errors now have a link to the submissions
This commit is contained in:
23
app/policies/request_for_comment_policy.rb
Normal file
23
app/policies/request_for_comment_policy.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
class RequestForCommentPolicy < ApplicationPolicy
|
||||
|
||||
|
||||
def create?
|
||||
everyone
|
||||
end
|
||||
|
||||
def show?
|
||||
everyone
|
||||
end
|
||||
|
||||
[:destroy?].each do |action|
|
||||
define_method(action) { admin? }
|
||||
end
|
||||
|
||||
def edit?
|
||||
admin?
|
||||
end
|
||||
|
||||
def index?
|
||||
everyone
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user