Sha256: 516432c52e51b2da0b96a288cc6c9ab189741c651e5c61dfb2dd852e391aff7b
Contents?: true
Size: 667 Bytes
Versions: 40
Compression:
Stored size: 667 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, session, options, usecase) end private def clear_abilities(users, session, options, usecase) 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
40 entries across 40 versions & 1 rubygems