Sha256: 9c6b6ef958cb54fdf79862a3ac2d80c231664d5ea3daf60cb030e1d141db1de7

Contents?: true

Size: 486 Bytes

Versions: 8

Compression:

Stored size: 486 Bytes

Contents

# frozen_string_literal: true

# generado con pg_rails

class UserPolicy < ApplicationPolicy
  class Scope < ApplicationPolicy::Scope
  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 base_access_to_record?
    user.developer? || user == record
  end

  def base_access_to_collection?
    user.present?
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pg_rails-7.6.5 pg_engine/app/policies/user_policy.rb
pg_rails-7.6.4 pg_engine/app/policies/user_policy.rb
pg_rails-7.6.3 pg_engine/app/policies/user_policy.rb
pg_rails-7.6.2 pg_engine/app/policies/user_policy.rb
pg_rails-7.6.1 pg_engine/app/policies/user_policy.rb
pg_rails-7.6.0 pg_engine/app/policies/user_policy.rb
pg_rails-7.5.7 pg_engine/app/policies/user_policy.rb
pg_rails-7.5.6 pg_engine/app/policies/user_policy.rb