Sha256: 67400645f58fce6e09b0d60b561818fc1650f2dee14ac82880271faef6598300
Contents?: true
Size: 573 Bytes
Versions: 6
Compression:
Stored size: 573 Bytes
Contents
# frozen_string_literal: true class UserPolicy < Policy def index? true end def deactivated? index? end def new? User.none? || user.role?(:users) end def create? new? end def login? true end def manage? new? end def edit? user == record || user.role?(:users) end def show? edit? end def delete_image? edit? end def policies? user.role?(:users) end def destroy? user.role?(:users) end def change_password? user == record end def otp? user == record end end
Version data entries
6 entries across 6 versions & 1 rubygems