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
2 3 4 |
# File 'lib/conjur/role_grant.rb', line 2 def admin_option @admin_option end |
#grantor ⇒ Object
Returns the value of attribute grantor
2 3 4 |
# File 'lib/conjur/role_grant.rb', line 2 def grantor @grantor end |
#member ⇒ Object
Returns the value of attribute member
2 3 4 |
# File 'lib/conjur/role_grant.rb', line 2 def member @member end |
Class Method Details
.parse_from_json(json, credentials) ⇒ Object
4 5 6 7 8 |
# File 'lib/conjur/role_grant.rb', line 4 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 |