Sha256: 36a3b502116f3baf28caead24fafbca0cad65a4b5eeb060ee643500c1e927011
Contents?: true
Size: 683 Bytes
Versions: 53
Compression:
Stored size: 683 Bytes
Contents
# frozen_string_literal: true # generado con pg_rails <% if namespaced? -%> require_dependency "<%= namespaced_path %>/application_policy" <% end -%> <% module_namespacing do -%> class <%= class_name %>Policy < ApplicationPolicy class Scope < ApplicationPolicy::Scope # def resolve # if policy.acceso_total? # scope.all # else # scope.none # end # end end # def puede_editar? # acceso_total? && !record.readonly? # end # def puede_crear? # acceso_total? || user.asesor? # end # def puede_borrar? # acceso_total? && !record.readonly? # end # def acceso_total? # user.developer? # end end <% end -%>
Version data entries
53 entries across 53 versions & 1 rubygems