lib/eco/api/usecases/default_cases/update_case.rb in eco-helpers-0.8.4 vs lib/eco/api/usecases/default_cases/update_case.rb in eco-helpers-0.9.1

- old
+ new

@@ -13,12 +13,12 @@ # p.suboption :exclude, :email, "Excludes core email from the update.", optional: true # p.suboption :exclude, :supervisor, "Excludes supervisor_id from the update.", optional: true # p.suboption :exclude, :abilities, "Excludes the abilities from the update.", optional: true #end - @cases.define("update", type: :sync) do |entries, people, session, options| - update = session.job_group("main").new("update", type: :update, sets: [:core, :details, :account]) + @cases.define("update", type: :sync) do |entries, people, session, options, usecase| + update = session.job_group("main").new("update", usecase: usecase, type: :update, sets: [:core, :details, :account]) strict_search = session.config.people.strict_search? && (!options[:search]&.key?(:strict) || options.dig(:search, :strict)) pgs = session.policy_groups entries.each.with_index do |entry, i| @@ -36,10 +36,10 @@ person.account.policy_group_ids = pgs.user_pg_ids( initial: ini_pg_ids, final: person.account.policy_group_ids ) - person.account.permissions_custom = session.new_preset(person) unless !create && options.dig(:exclude, :abilities) + person.account.permissions_custom = session.new_preset(person) unless options.dig(:exclude, :abilities) if session.tagtree person.account.filter_tags = session.tagtree.user_tags( initial: ini_tags, final: person.account.filter_tags,