summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb
blob: 7ae08823b8f5f6a3ea35b80bc6ac779552bf99c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require "chef/chef_fs/data_handler/data_handler_base"

class Chef
  module ChefFS
    module DataHandler
      class OrganizationInvitesDataHandler < DataHandlerBase
        def normalize(invites, entry)
          invites.map { |invite| invite.is_a?(Hash) ? invite["username"] : invite }.compact.sort.uniq
        end

        def minimize(invites, entry)
          invites
        end
      end
    end
  end
end