Sha256: 4400c022a9772178d32358a7db76fa330896289a32d25baf813daf0ae38090bf
Contents?: true
Size: 443 Bytes
Versions: 10
Compression:
Stored size: 443 Bytes
Contents
module Proclaim class ImagePolicy < ApplicationPolicy def cache? create? end def create? not @user.nil? # As long as there's a user, it can create images end def discard? destroy? end def destroy? not @user.nil? # As long as there's a user, it can destroy images end class Scope < Scope def resolve if @user scope.all # Users can access all images else nil end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems