Sha256: 86d046f639ce4b489b34b05dd3fb5a2513c838d54a775809682d768679890ced
Contents?: true
Size: 536 Bytes
Versions: 23
Compression:
Stored size: 536 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 end
Version data entries
23 entries across 23 versions & 1 rubygems