Class: G5AuthenticationClient::Role
- Inherits:
-
Modelish::Base
- Object
- Modelish::Base
- G5AuthenticationClient::Role
- Defined in:
- lib/g5_authentication_client/role.rb
Overview
G5 Authentication user role info
Constant Summary collapse
- GLOBAL =
'GLOBAL'
Instance Attribute Summary collapse
-
#name ⇒ String
The name associated with this user role.
-
#type ⇒ String
The role’s type.
-
#urn ⇒ String
The role’s resource urn.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ String
The name associated with this user role
13 |
# File 'lib/g5_authentication_client/role.rb', line 13 property :name, type: String, required: true |
#type ⇒ String
The role’s type. If ‘GLOBAL’ then not role not associated with a resource
18 |
# File 'lib/g5_authentication_client/role.rb', line 18 property :type, type: String, required: true |
#urn ⇒ String
The role’s resource urn. Will be nil if type=‘GLOBAL’
23 |
# File 'lib/g5_authentication_client/role.rb', line 23 property :urn, type: String |
Instance Method Details
#validate_for_create! ⇒ Object
25 26 27 28 |
# File 'lib/g5_authentication_client/role.rb', line 25 def validate_for_create! validate! raise ArgumentError.new("URN required when type != '#{GLOBAL}'") if urn.nil? && type != GLOBAL end |