Sha256: 68e323e3eab384856693d56b563b2e2bb04c2f0f58b7e2ae336862244be44393

Contents?: true

Size: 479 Bytes

Versions: 6

Compression:

Stored size: 479 Bytes

Contents

module Conjur::DSL2::Executor
  class Grant < Base
    def execute
      parameters = { "member" => statement.member.role.roleid(default_account) }
      parameters['admin_option'] = statement.member.admin unless statement.member.admin.nil?
      action({
        'method' => 'put',
        'path' => "authz/#{statement.role.account || default_account}/roles/#{statement.role.role_kind}/#{statement.role.id}?members",
        'parameters' => parameters
      })
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
conjur-asset-dsl2-0.4.4 lib/conjur/dsl2/executor/grant.rb
conjur-asset-dsl2-0.4.3 lib/conjur/dsl2/executor/grant.rb
conjur-asset-dsl2-0.4.2 lib/conjur/dsl2/executor/grant.rb
conjur-asset-dsl2-0.3.2 lib/conjur/dsl2/executor/grant.rb
conjur-asset-dsl2-0.3.1 lib/conjur/dsl2/executor/grant.rb
conjur-asset-dsl2-0.3.0 lib/conjur/dsl2/executor/grant.rb