Class: ActiveRecord::Relation
Overview
add the __synchromesh_permission_granted, acting_user and __secure_collection_check methods to Relation
Instance Attribute Summary collapse
-
#__synchromesh_permission_granted ⇒ Object
Returns the value of attribute __synchromesh_permission_granted.
-
#acting_user ⇒ Object
Returns the value of attribute acting_user.
Instance Method Summary collapse
Instance Attribute Details
#__synchromesh_permission_granted ⇒ Object
Returns the value of attribute __synchromesh_permission_granted.
40 41 42 |
# File 'lib/active_record_base.rb', line 40 def @__synchromesh_permission_granted end |
#acting_user ⇒ Object
Returns the value of attribute acting_user.
41 42 43 |
# File 'lib/active_record_base.rb', line 41 def acting_user @acting_user end |
Instance Method Details
#__secure_collection_check(acting_user) ⇒ Object
42 43 44 45 46 47 |
# File 'lib/active_record_base.rb', line 42 def __secure_collection_check(acting_user) return self if return self if __secure_remote_access_to_all(self, acting_user). return self if __secure_remote_access_to_unscoped(self, acting_user). Hyperloop::InternalPolicy.raise_operation_access_violation(:scoped_permission_not_granted, "Last relation: #{self}, acting_user: #{acting_user}") end |