class SDM::Role

A Role is a collection of access grants, and typically corresponds to a team, Active Directory OU, or other organizational unit. Users are granted access to resources by assigning them to roles.

Attributes

access_rules[RW]

AccessRules JSON encoded access rules data.

composite[RW]

True if the Role is a composite role.

id[RW]

Unique identifier of the Role.

name[RW]

Unique human-readable name of the Role.

tags[RW]

Tags is a map of key, value pairs.

Public Class Methods

new( id: nil, name: nil, access_rules: nil, composite: nil, tags: nil ) click to toggle source
# File lib/models/porcelain.rb, line 6706
def initialize(
  id: nil,
  name: nil,
  access_rules: nil,
  composite: nil,
  tags: nil
)
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if access_rules != nil
    @access_rules = access_rules
  end
  if composite != nil
    @composite = composite
  end
  if tags != nil
    @tags = tags
  end
end

Public Instance Methods

to_json(options = {}) click to toggle source
# File lib/models/porcelain.rb, line 6730
def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end