Sha256: 16db5b1930ceb5feccbdb681e8839425eae4e89a4ba80eaa46660476df112419
Contents?: true
Size: 613 Bytes
Versions: 8
Compression:
Stored size: 613 Bytes
Contents
class Eco::API::UseCases::DefaultCases::ClearAbilitiesTransCase < Eco::API::Common::Loaders::UseCase name "clear-abilities" type :transform def main(people, session, options, usecase) clear_abilities(people.users) end private def clear_abilities(users) update = session.new_job("main", "clear-abilities", :update, usecase, :account) users.each do |person| person.account.permissions_custom = nil_abilities.dup update.add(person) end end def nil_abilities @nil_abilities ||= Eco::API::Organization::PresetsFactory.all_abilities end end
Version data entries
8 entries across 8 versions & 1 rubygems