Class: Conjur::RoleGrant
- Inherits:
-
Struct
- Object
- Struct
- Conjur::RoleGrant
- Defined in:
- lib/conjur/role_grant.rb
Instance Attribute Summary collapse
-
#admin_option ⇒ Object
Returns the value of attribute admin_option.
-
#grantor ⇒ Object
Returns the value of attribute grantor.
-
#member ⇒ Object
Returns the value of attribute member.
Class Method Summary collapse
Instance Attribute Details
#admin_option ⇒ Object
Returns the value of attribute admin_option
22 23 24 |
# File 'lib/conjur/role_grant.rb', line 22 def admin_option @admin_option end |
#grantor ⇒ Object
Returns the value of attribute grantor
22 23 24 |
# File 'lib/conjur/role_grant.rb', line 22 def grantor @grantor end |
#member ⇒ Object
Returns the value of attribute member
22 23 24 |
# File 'lib/conjur/role_grant.rb', line 22 def member @member end |
Class Method Details
.parse_from_json(json, credentials) ⇒ Object
24 25 26 27 28 |
# File 'lib/conjur/role_grant.rb', line 24 def parse_from_json(json, credentials) member = Role.new(Conjur::Authz::API.host, credentials)[Conjur::API.parse_role_id(json['member']).join('/')] grantor = Role.new(Conjur::Authz::API.host, credentials)[Conjur::API.parse_role_id(json['grantor']).join('/')] RoleGrant.new(member, grantor, json['admin_option']) end |