Class: Superset::Security::Role::Permission::Create
- Defined in:
- lib/superset/security/role/permission/create.rb
Constant Summary
Constants inherited from Request
Instance Attribute Summary collapse
-
#permission_view_menu_ids ⇒ Object
readonly
Returns the value of attribute permission_view_menu_ids.
-
#role_id ⇒ Object
readonly
Returns the value of attribute role_id.
Attributes inherited from Request
Instance Method Summary collapse
-
#initialize(role_id:, permission_view_menu_ids: []) ⇒ Create
constructor
A new instance of Create.
- #response ⇒ Object
Methods inherited from Request
call, #query_params, #result, #superset_host
Methods included from Display
#display_headers, #headings, #list, #list_attributes, #result, #rows, #table, #title
Constructor Details
#initialize(role_id:, permission_view_menu_ids: []) ⇒ Create
Returns a new instance of Create.
8 9 10 11 |
# File 'lib/superset/security/role/permission/create.rb', line 8 def initialize(role_id:, permission_view_menu_ids: []) @permission_view_menu_ids = @role_id = role_id end |
Instance Attribute Details
#permission_view_menu_ids ⇒ Object (readonly)
Returns the value of attribute permission_view_menu_ids.
6 7 8 |
# File 'lib/superset/security/role/permission/create.rb', line 6 def @permission_view_menu_ids end |
#role_id ⇒ Object (readonly)
Returns the value of attribute role_id.
6 7 8 |
# File 'lib/superset/security/role/permission/create.rb', line 6 def role_id @role_id end |
Instance Method Details
#response ⇒ Object
13 14 15 16 17 18 |
# File 'lib/superset/security/role/permission/create.rb', line 13 def response raise InvalidParameterError unless valid_params? @response ||= client.post(route, { "permission_view_menu_ids": } ) end |