lib/recurso/concerns/identity.rb in recurso-0.5.3 vs lib/recurso/concerns/identity.rb in recurso-0.6.1

- old
+ new

@@ -9,9 +9,18 @@ def policy(resource = self) (resource&.policy_class || Recurso::NilClassPolicy).new(self, resource) end + def resources_with_permission(relation_name, action: :view, all_columns: true, include_actions: []) + policy(Recurso::Global.instance).resources_with_permission( + relation_name, + action: action, + all_columns: all_columns, + include_actions: include_actions + ) + end + def policy_class Recurso::BasePolicy end end end