module BannedWords
  class ItemPolicy < ApplicationPolicy
    def index?
      allowed?
    end

    def new?
      allowed?
    end

    def create?
      allowed?
    end

    def destroy?
      allowed?
    end

    def allowed?
      user.permitted? BeefCake::Permission.for(:global_banned_words)
    end
  end
end
