Class: Eco::API::UseCases::DefaultCases::RefreshAbilitiesCase
- Inherits:
-
Common::Loaders::UseCase
- Object
- Common::BaseLoader
- Common::Loaders::UseCase
- Eco::API::UseCases::DefaultCases::RefreshAbilitiesCase
- Defined in:
- lib/eco/api/usecases/default_cases/refresh_abilities_case.rb
Instance Method Summary collapse
-
#main(people, session, options, usecase) ⇒ Void
Usecase to refresh the user's account abilities as defined in the org config for their usergroups.
Methods inherited from Common::Loaders::UseCase
Methods inherited from Common::BaseLoader
<=>, created_at, #initialize, #name, name_only_once!, set_created_at!
Methods included from Common::ClassHelpers
#class_resolver, #descendants, #descendants?, #new_class, #resolve_class, #to_constant
Constructor Details
This class inherits a constructor from Eco::API::Common::Loaders::UseCase
Instance Method Details
#main(people, session, options, usecase) ⇒ Void
Usecase to refresh the user's account abilities as defined in the org config for their usergroups.
10 11 12 13 14 15 16 17 |
# File 'lib/eco/api/usecases/default_cases/refresh_abilities_case.rb', line 10 def main(people, session, , usecase) users = require_users!(people, session.logger) update = session.new_job("main", "update", :update, usecase, :account) users.each do |person| person.account. = session.new_preset(person) update.add(person) end end |