Sha256: 5ef09bf048d53ec9116da55b4e53149da1b99969077091abc7f41e6807d2e892

Contents?: true

Size: 531 Bytes

Versions: 1

Compression:

Stored size: 531 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', '')

    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

1 entries across 1 versions & 1 rubygems

Version Path
yao-0.6.1 lib/yao/resources/role_assignment.rb