Sha256: e0780206d5c227a7fc6d8b2d97b90fa3655ce674c48f93212447c35cfbe49918
Contents?: true
Size: 602 Bytes
Versions: 11
Compression:
Stored size: 602 Bytes
Contents
# frozen_string_literal: true require 'proxes/policies/application_policy' module ProxES class AuditLogPolicy < ApplicationPolicy def create? user && user.super_admin? end def list? create? end def read? create? end def update? read? end def delete? create? end def permitted_attributes [:action, :details] end class Scope < ApplicationPolicy::Scope def resolve if user && user.super_admin? scope else scope.where(id: -1) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems