pundit: add missing authorize calls.

This commit is contained in:
evazion
2020-03-24 00:38:07 -05:00
parent 4a5bec71f6
commit 0ad5619484
5 changed files with 11 additions and 3 deletions

View File

@@ -1,4 +1,8 @@
class ForumPostPolicy < ApplicationPolicy
def index?
true
end
def show?
user.level >= record.topic.min_level
end

View File

@@ -1,4 +1,8 @@
class ForumTopicPolicy < ApplicationPolicy
def index?
true
end
def show?
user.level >= record.min_level
end