Sha256: bd8daa854648c5b87b4e0cd7af5f8c52a2aeea626c650485cbc216455b4534e8

Contents?: true

Size: 408 Bytes

Versions: 39

Compression:

Stored size: 408 Bytes

Contents

module Awspec::Type
  class IamUser < Base
    def initialize(id)
      super
      @resource = find_iam_user(id)
      @id = @resource[:user_id] if @resource
    end

    def has_iam_policy?(policy_id)
      policies = select_iam_policy_by_user_name(@resource[:user_name])
      policies.find do |policy|
        policy.policy_arn == policy_id || policy.policy_name == policy_id
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
awspec-0.25.3 lib/awspec/type/iam_user.rb
awspec-0.25.2 lib/awspec/type/iam_user.rb
awspec-0.25.1 lib/awspec/type/iam_user.rb
awspec-0.25.0 lib/awspec/type/iam_user.rb
awspec-0.24.2 lib/awspec/type/iam_user.rb
awspec-0.24.1 lib/awspec/type/iam_user.rb
awspec-0.24.0 lib/awspec/type/iam_user.rb
awspec-0.23.0 lib/awspec/type/iam_user.rb
awspec-0.22.1 lib/awspec/type/iam_user.rb
awspec-0.22.0 lib/awspec/type/iam_user.rb
awspec-0.21.6 lib/awspec/type/iam_user.rb
awspec-0.21.5 lib/awspec/type/iam_user.rb
awspec-0.21.4 lib/awspec/type/iam_user.rb
awspec-0.21.3 lib/awspec/type/iam_user.rb
awspec-0.21.2 lib/awspec/type/iam_user.rb
awspec-0.21.1 lib/awspec/type/iam_user.rb
awspec-0.21.0 lib/awspec/type/iam_user.rb
awspec-0.20.2 lib/awspec/type/iam_user.rb
awspec-0.20.1 lib/awspec/type/iam_user.rb
awspec-0.20.0 lib/awspec/type/iam_user.rb