Commit d00f8391 by dongxiaowei

fix: 修复 policy_class 配置失效问题

parent ac27dcaa
......@@ -292,8 +292,7 @@ class SimpleController::BaseController < ::InheritedResources::Base
end
scope_policy_class.new(current_user, policy_association_chain, **parent_objects).resolve
else
origin_end_of_association_chain.respond_to?(:all) ?
origin_end_of_association_chain.all : origin_end_of_association_chain
policy_association_chain
end
end
......@@ -316,7 +315,6 @@ class SimpleController::BaseController < ::InheritedResources::Base
def query_association_chain
if self.class.instance_variable_get(:@ransack_off) || params[:q].blank?
database_policy_association_chain
# policy_association_chain
else
ransack_association(database_policy_association_chain, params[:q])
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment