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.19.0 lib/awspec/type/iam_user.rb
awspec-0.18.2 lib/awspec/type/iam_user.rb
awspec-0.18.1 lib/awspec/type/iam_user.rb
awspec-0.18.0 lib/awspec/type/iam_user.rb
awspec-0.17.1 lib/awspec/type/iam_user.rb
awspec-0.17.0 lib/awspec/type/iam_user.rb
awspec-0.16.0 lib/awspec/type/iam_user.rb
awspec-0.15.0 lib/awspec/type/iam_user.rb
awspec-0.14.1 lib/awspec/type/iam_user.rb
awspec-0.14.0 lib/awspec/type/iam_user.rb
awspec-0.13.0 lib/awspec/type/iam_user.rb
awspec-0.12.1 lib/awspec/type/iam_user.rb
awspec-0.12.0 lib/awspec/type/iam_user.rb
awspec-0.11.0 lib/awspec/type/iam_user.rb
awspec-0.10.2 lib/awspec/type/iam_user.rb
awspec-0.10.1 lib/awspec/type/iam_user.rb
awspec-0.10.0 lib/awspec/type/iam_user.rb
awspec-0.9.0 lib/awspec/type/iam_user.rb
awspec-0.8.1 lib/awspec/type/iam_user.rb