Sha256: b3e3232d00d5bf6b3c84673a869283393ec3612f29bf252eb02de00b6b355b7c

Contents?: true

Size: 640 Bytes

Versions: 29

Compression:

Stored size: 640 Bytes

Contents

module Eco
  module API
    class MicroCases
      # It sets the correct set of abilities based on the usergroups of `person`.
      # @param person [Ecoportal::API::V1::Person] the person we want to update, carrying the changes to be done.
      # @param options [Hash] the options.
      def refresh_abilities(person, options)
        unless options.dig(:exclude, :account)
          if person.account
            unless options.dig(:exclude, :abilities) && !person.new?
              person.account.permissions_custom = session.new_preset(person)
            end
          end
        end
      end

    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
eco-helpers-2.0.16 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-2.0.15 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-2.0.14 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-2.0.13 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-2.0.12 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-2.0.11 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-2.0.10 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-2.0.9 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-2.0.8 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-2.0.7 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-2.0.6 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-2.0.5 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-2.0.4 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-2.0.3 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-2.0.2 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-1.5.15 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-1.5.14 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-1.5.13 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-1.5.12 lib/eco/api/microcases/refresh_abilities.rb
eco-helpers-1.5.11 lib/eco/api/microcases/refresh_abilities.rb