hyper-mesh icon indicating copy to clipboard operation
hyper-mesh copied to clipboard

in edge branch, the limit scope doesn't work unless you explicitly regulate it

Open adamcreekroad opened this issue 6 years ago • 1 comments

Currently to use it on the client you must do this:

class ApplicationRecord < ActiveRecord::Base
  regulate_scope limit: :always_allow
end

Even if you have regulate_scope for all and unscoped

adamcreekroad avatar Mar 26 '18 20:03 adamcreekroad

not sure but I think this might be because scope :limit, ->() {} scope :offset, ->() {} is in the CLIENT side base class.

this means the client will assume there is a secure_remote_access_limit method on the server, but there is NOT.

by calling regulate_scope... this creates (I think) the secure_remote_access_limit method to be created.

catmando avatar Mar 28 '18 16:03 catmando