Class: SDM::RoleGrant
- Inherits:
-
Object
- Object
- SDM::RoleGrant
- Defined in:
- lib/models/porcelain.rb
Overview
A RoleGrant connects a resource to a role, granting members of the role access to that resource.
Deprecated: use Role access rules instead.
Instance Attribute Summary collapse
-
#id ⇒ Object
Unique identifier of the RoleGrant.
-
#resource_id ⇒ Object
The id of the resource of this RoleGrant.
-
#role_id ⇒ Object
The id of the attached role of this RoleGrant.
Instance Method Summary collapse
-
#initialize(id: nil, resource_id: nil, role_id: nil) ⇒ RoleGrant
constructor
A new instance of RoleGrant.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(id: nil, resource_id: nil, role_id: nil) ⇒ RoleGrant
Returns a new instance of RoleGrant.
4930 4931 4932 4933 4934 4935 4936 4937 4938 |
# File 'lib/models/porcelain.rb', line 4930 def initialize( id: nil, resource_id: nil, role_id: nil ) @id = id == nil ? "" : id @resource_id = resource_id == nil ? "" : resource_id @role_id = role_id == nil ? "" : role_id end |
Instance Attribute Details
#id ⇒ Object
Unique identifier of the RoleGrant.
4924 4925 4926 |
# File 'lib/models/porcelain.rb', line 4924 def id @id end |
#resource_id ⇒ Object
The id of the resource of this RoleGrant.
4926 4927 4928 |
# File 'lib/models/porcelain.rb', line 4926 def resource_id @resource_id end |
#role_id ⇒ Object
The id of the attached role of this RoleGrant.
4928 4929 4930 |
# File 'lib/models/porcelain.rb', line 4928 def role_id @role_id end |
Instance Method Details
#to_json(options = {}) ⇒ Object
4940 4941 4942 4943 4944 4945 4946 |
# File 'lib/models/porcelain.rb', line 4940 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |