Sha256: 024ac2ffff7433e1af83e6f4cb2349032ae859dd32593d2e7fc748ece55f6a4d

Contents?: true

Size: 539 Bytes

Versions: 4

Compression:

Stored size: 539 Bytes

Contents

module Yao::Resources
  class RoleAssignment < Base
    friendly_attributes :scope, :role, :user
    self.service        = "identity"
    self.resource_name  = "role_assignment"
    self.resources_name  = "role_assignments"
    self.admin          = true
    self.api_version    = "v3"
    self.client.url_prefix = Yao.config.auth_url.gsub('v2.0', 'v3')

    def project
      @project ||= Yao::Tenant.get(scope["project"]["id"])
    end

    map_attribute_to_resource  :role => Role
    map_attribute_to_resource  :user => User
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yao-0.3.7 lib/yao/resources/role_assignment.rb
yao-0.3.6 lib/yao/resources/role_assignment.rb
yao-0.3.5 lib/yao/resources/role_assignment.rb
yao-0.3.4 lib/yao/resources/role_assignment.rb