Class: Mudbase::MultiRoleFeatureApi
- Inherits:
-
Object
- Object
- Mudbase::MultiRoleFeatureApi
- Defined in:
- lib/mudbase/api/multi_role_feature_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_custom_role(project_id, add_custom_role_request, opts = {}) ⇒ ApplyRoleFeaturePreset200Response
Add custom role Add a custom role to a project with specific permissions and signup endpoint.
-
#add_custom_role_with_http_info(project_id, add_custom_role_request, opts = {}) ⇒ Array<(ApplyRoleFeaturePreset200Response, Integer, Hash)>
Add custom role Add a custom role to a project with specific permissions and signup endpoint.
-
#apply_role_feature_preset(project_id, role_slug, apply_role_feature_preset_request, opts = {}) ⇒ ApplyRoleFeaturePreset200Response
Apply Admin / User / Viewer feature permission preset Sets
featurePermissionson the role from a bundled preset (admin,user,viewer). -
#apply_role_feature_preset_with_http_info(project_id, role_slug, apply_role_feature_preset_request, opts = {}) ⇒ Array<(ApplyRoleFeaturePreset200Response, Integer, Hash)>
Apply Admin / User / Viewer feature permission preset Sets `featurePermissions` on the role from a bundled preset (`admin`, `user`, `viewer`).
-
#get_available_roles(project_id, opts = {}) ⇒ GetAvailableRoles200Response
Get available roles for signup Get all available roles for user signup in a project.
-
#get_available_roles_with_http_info(project_id, opts = {}) ⇒ Array<(GetAvailableRoles200Response, Integer, Hash)>
Get available roles for signup Get all available roles for user signup in a project.
-
#get_multi_role_config(project_id, opts = {}) ⇒ GetMultiRoleConfig200Response
Get multi-role feature configuration Returns project app roles (default one editable
customerstarter until you add more) and settings. -
#get_multi_role_config_with_http_info(project_id, opts = {}) ⇒ Array<(GetMultiRoleConfig200Response, Integer, Hash)>
Get multi-role feature configuration Returns project app roles (default one editable `customer` starter until you add more) and settings.
-
#get_permissions_matrix(project_id, opts = {}) ⇒ GetPermissionsMatrix200Response
Get permissions matrix (collections + featurePermissions) Dashboard helper: per-collection permission rows (role actions,
dataScope, conditions) and a per-rolefeaturePermissionssnapshot used by app-role feature gates (messaging, integrations, storage, etc.). -
#get_permissions_matrix_with_http_info(project_id, opts = {}) ⇒ Array<(GetPermissionsMatrix200Response, Integer, Hash)>
Get permissions matrix (collections + featurePermissions) Dashboard helper: per-collection permission rows (role actions, `dataScope`, conditions) and a per-role `featurePermissions` snapshot used by app-role feature gates (messaging, integrations, storage, etc.).
-
#initialize(api_client = ApiClient.default) ⇒ MultiRoleFeatureApi
constructor
A new instance of MultiRoleFeatureApi.
-
#oauth_signup_with_role(role, provider, project_id, opts = {}) ⇒ nil
OAuth signup with specific role Public endpoint that initiates OAuth signup flow with a specific role assigned during registration.
-
#oauth_signup_with_role_with_http_info(role, provider, project_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
OAuth signup with specific role Public endpoint that initiates OAuth signup flow with a specific role assigned during registration.
-
#register_with_role(role, register_with_role_request, opts = {}) ⇒ RegisterWithRole201Response
Register user with specific role (Local Auth) Public endpoint for user registration with a specific role.
-
#register_with_role_with_http_info(role, register_with_role_request, opts = {}) ⇒ Array<(RegisterWithRole201Response, Integer, Hash)>
Register user with specific role (Local Auth) Public endpoint for user registration with a specific role.
-
#simulate_app_permissions(project_id, simulate_app_permissions_request, opts = {}) ⇒ SimulateAppPermissions200Response
Simulate app-role feature permission for a path Dashboard-only.
-
#simulate_app_permissions_with_http_info(project_id, simulate_app_permissions_request, opts = {}) ⇒ Array<(SimulateAppPermissions200Response, Integer, Hash)>
Simulate app-role feature permission for a path Dashboard-only.
-
#toggle_role(project_id, role_slug, toggle_role_request, opts = {}) ⇒ ApplyRoleFeaturePreset200Response
Toggle role on/off.
-
#toggle_role_with_http_info(project_id, role_slug, toggle_role_request, opts = {}) ⇒ Array<(ApplyRoleFeaturePreset200Response, Integer, Hash)>
Toggle role on/off.
-
#update_collection_permissions(project_id, role_slug, collection_id, update_collection_permissions_request, opts = {}) ⇒ ApplyRoleFeaturePreset200Response
Update collection permissions for a role Update collection-specific permissions for a role in a project.
-
#update_collection_permissions_with_http_info(project_id, role_slug, collection_id, update_collection_permissions_request, opts = {}) ⇒ Array<(ApplyRoleFeaturePreset200Response, Integer, Hash)>
Update collection permissions for a role Update collection-specific permissions for a role in a project.
-
#update_multi_role_settings(project_id, update_multi_role_settings_request, opts = {}) ⇒ UpdateMultiRoleSettings200Response
Update multi-role feature settings Update multi-role feature settings for a project: enable/disable the feature, set which app role is the default at signup, and tune
settings(allowMultipleRoles,requireRoleSelection,autoAssignDefault). -
#update_multi_role_settings_with_http_info(project_id, update_multi_role_settings_request, opts = {}) ⇒ Array<(UpdateMultiRoleSettings200Response, Integer, Hash)>
Update multi-role feature settings Update multi-role feature settings for a project: enable/disable the feature, set which app role is the default at signup, and tune `settings` (`allowMultipleRoles`, `requireRoleSelection`, `autoAssignDefault`).
-
#update_project_role(project_id, role_slug, update_project_role_request, opts = {}) ⇒ ApplyRoleFeaturePreset200Response
Update role configuration Partial update of an app role.
-
#update_project_role_with_http_info(project_id, role_slug, update_project_role_request, opts = {}) ⇒ Array<(ApplyRoleFeaturePreset200Response, Integer, Hash)>
Update role configuration Partial update of an app role.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ MultiRoleFeatureApi
Returns a new instance of MultiRoleFeatureApi.
19 20 21 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_custom_role(project_id, add_custom_role_request, opts = {}) ⇒ ApplyRoleFeaturePreset200Response
Add custom role
Add a custom role to a project with specific permissions and signup endpoint. Optional featurePermissions must align with app JWT gates — see components/schemas/AppRoleFeaturePermissions and services/appRoleFeatureMap.js. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.
28 29 30 31 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 28 def add_custom_role(project_id, add_custom_role_request, opts = {}) data, _status_code, _headers = add_custom_role_with_http_info(project_id, add_custom_role_request, opts) data end |
#add_custom_role_with_http_info(project_id, add_custom_role_request, opts = {}) ⇒ Array<(ApplyRoleFeaturePreset200Response, Integer, Hash)>
Add custom role Add a custom role to a project with specific permissions and signup endpoint. Optional `featurePermissions` must align with app JWT gates — see `components/schemas/AppRoleFeaturePermissions` and `services/appRoleFeatureMap.js`. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 39 def add_custom_role_with_http_info(project_id, add_custom_role_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.add_custom_role ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleFeatureApi.add_custom_role" end # verify the required parameter 'add_custom_role_request' is set if @api_client.config.client_side_validation && add_custom_role_request.nil? fail ArgumentError, "Missing the required parameter 'add_custom_role_request' when calling MultiRoleFeatureApi.add_custom_role" end # resource path local_var_path = '/api/projects/{projectId}/multi-role/roles'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(add_custom_role_request) # return_type return_type = opts[:debug_return_type] || 'ApplyRoleFeaturePreset200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.add_custom_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleFeatureApi#add_custom_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#apply_role_feature_preset(project_id, role_slug, apply_role_feature_preset_request, opts = {}) ⇒ ApplyRoleFeaturePreset200Response
Apply Admin / User / Viewer feature permission preset
Sets featurePermissions on the role from a bundled preset (admin, user, viewer). Does not change collection CRUD or dataScope; use collection permission APIs for those.
103 104 105 106 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 103 def apply_role_feature_preset(project_id, role_slug, apply_role_feature_preset_request, opts = {}) data, _status_code, _headers = apply_role_feature_preset_with_http_info(project_id, role_slug, apply_role_feature_preset_request, opts) data end |
#apply_role_feature_preset_with_http_info(project_id, role_slug, apply_role_feature_preset_request, opts = {}) ⇒ Array<(ApplyRoleFeaturePreset200Response, Integer, Hash)>
Apply Admin / User / Viewer feature permission preset Sets `featurePermissions` on the role from a bundled preset (`admin`, `user`, `viewer`). Does not change collection CRUD or `dataScope`; use collection permission APIs for those.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 115 def apply_role_feature_preset_with_http_info(project_id, role_slug, apply_role_feature_preset_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.apply_role_feature_preset ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleFeatureApi.apply_role_feature_preset" end # verify the required parameter 'role_slug' is set if @api_client.config.client_side_validation && role_slug.nil? fail ArgumentError, "Missing the required parameter 'role_slug' when calling MultiRoleFeatureApi.apply_role_feature_preset" end # verify the required parameter 'apply_role_feature_preset_request' is set if @api_client.config.client_side_validation && apply_role_feature_preset_request.nil? fail ArgumentError, "Missing the required parameter 'apply_role_feature_preset_request' when calling MultiRoleFeatureApi.apply_role_feature_preset" end # resource path local_var_path = '/api/projects/{projectId}/multi-role/roles/{roleSlug}/apply-preset'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)).sub('{' + 'roleSlug' + '}', CGI.escape(role_slug.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(apply_role_feature_preset_request) # return_type return_type = opts[:debug_return_type] || 'ApplyRoleFeaturePreset200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.apply_role_feature_preset", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleFeatureApi#apply_role_feature_preset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_available_roles(project_id, opts = {}) ⇒ GetAvailableRoles200Response
Get available roles for signup Get all available roles for user signup in a project. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.
181 182 183 184 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 181 def get_available_roles(project_id, opts = {}) data, _status_code, _headers = get_available_roles_with_http_info(project_id, opts) data end |
#get_available_roles_with_http_info(project_id, opts = {}) ⇒ Array<(GetAvailableRoles200Response, Integer, Hash)>
Get available roles for signup Get all available roles for user signup in a project. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 191 def get_available_roles_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.get_available_roles ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleFeatureApi.get_available_roles" end # resource path local_var_path = '/api/projects/{projectId}/multi-role/roles/available'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetAvailableRoles200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.get_available_roles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleFeatureApi#get_available_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_multi_role_config(project_id, opts = {}) ⇒ GetMultiRoleConfig200Response
Get multi-role feature configuration
Returns project app roles (default one editable customer starter until you add more) and settings
244 245 246 247 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 244 def get_multi_role_config(project_id, opts = {}) data, _status_code, _headers = get_multi_role_config_with_http_info(project_id, opts) data end |
#get_multi_role_config_with_http_info(project_id, opts = {}) ⇒ Array<(GetMultiRoleConfig200Response, Integer, Hash)>
Get multi-role feature configuration Returns project app roles (default one editable `customer` starter until you add more) and settings
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 254 def get_multi_role_config_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.get_multi_role_config ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleFeatureApi.get_multi_role_config" end # resource path local_var_path = '/api/projects/{projectId}/multi-role'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetMultiRoleConfig200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.get_multi_role_config", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleFeatureApi#get_multi_role_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_permissions_matrix(project_id, opts = {}) ⇒ GetPermissionsMatrix200Response
Get permissions matrix (collections + featurePermissions)
Dashboard helper: per-collection permission rows (role actions, dataScope, conditions) and a per-role featurePermissions snapshot used by app-role feature gates (messaging, integrations, storage, etc.).
307 308 309 310 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 307 def (project_id, opts = {}) data, _status_code, _headers = (project_id, opts) data end |
#get_permissions_matrix_with_http_info(project_id, opts = {}) ⇒ Array<(GetPermissionsMatrix200Response, Integer, Hash)>
Get permissions matrix (collections + featurePermissions) Dashboard helper: per-collection permission rows (role actions, `dataScope`, conditions) and a per-role `featurePermissions` snapshot used by app-role feature gates (messaging, integrations, storage, etc.).
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 317 def (project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.get_permissions_matrix ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleFeatureApi.get_permissions_matrix" end # resource path local_var_path = '/api/projects/{projectId}/permissions-matrix'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetPermissionsMatrix200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.get_permissions_matrix", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleFeatureApi#get_permissions_matrix\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#oauth_signup_with_role(role, provider, project_id, opts = {}) ⇒ nil
OAuth signup with specific role Public endpoint that initiates OAuth signup flow with a specific role assigned during registration. The OAuth provider must be configured and enabled for the project first. The role must be available for signup in the project's multi-role configuration. After successful OAuth authentication, the user will be created with the specified role. No authentication required - this is a public signup endpoint.
373 374 375 376 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 373 def oauth_signup_with_role(role, provider, project_id, opts = {}) oauth_signup_with_role_with_http_info(role, provider, project_id, opts) nil end |
#oauth_signup_with_role_with_http_info(role, provider, project_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
OAuth signup with specific role Public endpoint that initiates OAuth signup flow with a specific role assigned during registration. The OAuth provider must be configured and enabled for the project first. The role must be available for signup in the project's multi-role configuration. After successful OAuth authentication, the user will be created with the specified role. No authentication required - this is a public signup endpoint.
386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 386 def oauth_signup_with_role_with_http_info(role, provider, project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.oauth_signup_with_role ...' end # verify the required parameter 'role' is set if @api_client.config.client_side_validation && role.nil? fail ArgumentError, "Missing the required parameter 'role' when calling MultiRoleFeatureApi.oauth_signup_with_role" end # verify the required parameter 'provider' is set if @api_client.config.client_side_validation && provider.nil? fail ArgumentError, "Missing the required parameter 'provider' when calling MultiRoleFeatureApi.oauth_signup_with_role" end # verify enum value allowable_values = ["google", "github", "facebook", "microsoft", "apple", "twitter", "discord", "linkedin", "dropbox", "slack", "reddit", "twitch", "figma", "zoom", "bitbucket", "salesforce", "shopify", "line", "spotify", "strava", "paypal", "asana", "trello", "okta", "gitea", "yandex", "yahoo", "vk", "meetup"] if @api_client.config.client_side_validation && !allowable_values.include?(provider) fail ArgumentError, "invalid value for \"provider\", must be one of #{allowable_values}" end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleFeatureApi.oauth_signup_with_role" end # resource path local_var_path = '/api/auth/oauth/signup/{role}/{provider}/{projectId}'.sub('{' + 'role' + '}', CGI.escape(role.to_s)).sub('{' + 'provider' + '}', CGI.escape(provider.to_s)).sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'redirect_url'] = opts[:'redirect_url'] if !opts[:'redirect_url'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"MultiRoleFeatureApi.oauth_signup_with_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleFeatureApi#oauth_signup_with_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#register_with_role(role, register_with_role_request, opts = {}) ⇒ RegisterWithRole201Response
Register user with specific role (Local Auth)
Public endpoint for user registration with a specific role. The path segment must match a role's signupEndpoint (default starter is customer; add more roles via multi-role API). No authentication required - this is a public signup endpoint.
454 455 456 457 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 454 def register_with_role(role, register_with_role_request, opts = {}) data, _status_code, _headers = register_with_role_with_http_info(role, register_with_role_request, opts) data end |
#register_with_role_with_http_info(role, register_with_role_request, opts = {}) ⇒ Array<(RegisterWithRole201Response, Integer, Hash)>
Register user with specific role (Local Auth) Public endpoint for user registration with a specific role. The path segment must match a role's `signupEndpoint` (default starter is `customer`; add more roles via multi-role API). No authentication required - this is a public signup endpoint.
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 465 def register_with_role_with_http_info(role, register_with_role_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.register_with_role ...' end # verify the required parameter 'role' is set if @api_client.config.client_side_validation && role.nil? fail ArgumentError, "Missing the required parameter 'role' when calling MultiRoleFeatureApi.register_with_role" end # verify the required parameter 'register_with_role_request' is set if @api_client.config.client_side_validation && register_with_role_request.nil? fail ArgumentError, "Missing the required parameter 'register_with_role_request' when calling MultiRoleFeatureApi.register_with_role" end # resource path local_var_path = '/api/auth/local/signup/{role}'.sub('{' + 'role' + '}', CGI.escape(role.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(register_with_role_request) # return_type return_type = opts[:debug_return_type] || 'RegisterWithRole201Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"MultiRoleFeatureApi.register_with_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleFeatureApi#register_with_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#simulate_app_permissions(project_id, simulate_app_permissions_request, opts = {}) ⇒ SimulateAppPermissions200Response
Simulate app-role feature permission for a path
Dashboard-only. Given an app role slug and either an OpenAPI operationId or HTTP method + pathname, returns whether the role's featurePermissions would allow the operation for paths that have a feature gate. Unmapped paths or unknown operation IDs return allowed: true with reason no_feature_gate_for_path or no_feature_gate_for_operation_id.
528 529 530 531 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 528 def (project_id, , opts = {}) data, _status_code, _headers = (project_id, , opts) data end |
#simulate_app_permissions_with_http_info(project_id, simulate_app_permissions_request, opts = {}) ⇒ Array<(SimulateAppPermissions200Response, Integer, Hash)>
Simulate app-role feature permission for a path Dashboard-only. Given an app role slug and either an OpenAPI `operationId` or HTTP method + pathname, returns whether the role's `featurePermissions` would allow the operation for paths that have a feature gate. Unmapped paths or unknown operation IDs return `allowed: true` with reason `no_feature_gate_for_path` or `no_feature_gate_for_operation_id`.
539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 539 def (project_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.simulate_app_permissions ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleFeatureApi.simulate_app_permissions" end # resource path local_var_path = '/api/projects/{projectId}/multi-role/simulate-permissions'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body() # return_type return_type = opts[:debug_return_type] || 'SimulateAppPermissions200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.simulate_app_permissions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleFeatureApi#simulate_app_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#toggle_role(project_id, role_slug, toggle_role_request, opts = {}) ⇒ ApplyRoleFeaturePreset200Response
Toggle role on/off
598 599 600 601 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 598 def toggle_role(project_id, role_slug, toggle_role_request, opts = {}) data, _status_code, _headers = toggle_role_with_http_info(project_id, role_slug, toggle_role_request, opts) data end |
#toggle_role_with_http_info(project_id, role_slug, toggle_role_request, opts = {}) ⇒ Array<(ApplyRoleFeaturePreset200Response, Integer, Hash)>
Toggle role on/off
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 609 def toggle_role_with_http_info(project_id, role_slug, toggle_role_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.toggle_role ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleFeatureApi.toggle_role" end # verify the required parameter 'role_slug' is set if @api_client.config.client_side_validation && role_slug.nil? fail ArgumentError, "Missing the required parameter 'role_slug' when calling MultiRoleFeatureApi.toggle_role" end # verify the required parameter 'toggle_role_request' is set if @api_client.config.client_side_validation && toggle_role_request.nil? fail ArgumentError, "Missing the required parameter 'toggle_role_request' when calling MultiRoleFeatureApi.toggle_role" end # resource path local_var_path = '/api/projects/{projectId}/multi-role/roles/{roleSlug}/toggle'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)).sub('{' + 'roleSlug' + '}', CGI.escape(role_slug.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(toggle_role_request) # return_type return_type = opts[:debug_return_type] || 'ApplyRoleFeaturePreset200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.toggle_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleFeatureApi#toggle_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_collection_permissions(project_id, role_slug, collection_id, update_collection_permissions_request, opts = {}) ⇒ ApplyRoleFeaturePreset200Response
Update collection permissions for a role Update collection-specific permissions for a role in a project. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.
678 679 680 681 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 678 def (project_id, role_slug, collection_id, , opts = {}) data, _status_code, _headers = (project_id, role_slug, collection_id, , opts) data end |
#update_collection_permissions_with_http_info(project_id, role_slug, collection_id, update_collection_permissions_request, opts = {}) ⇒ Array<(ApplyRoleFeaturePreset200Response, Integer, Hash)>
Update collection permissions for a role Update collection-specific permissions for a role in a project. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.
691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 691 def (project_id, role_slug, collection_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.update_collection_permissions ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleFeatureApi.update_collection_permissions" end # verify the required parameter 'role_slug' is set if @api_client.config.client_side_validation && role_slug.nil? fail ArgumentError, "Missing the required parameter 'role_slug' when calling MultiRoleFeatureApi.update_collection_permissions" end # verify the required parameter 'collection_id' is set if @api_client.config.client_side_validation && collection_id.nil? fail ArgumentError, "Missing the required parameter 'collection_id' when calling MultiRoleFeatureApi.update_collection_permissions" end # verify the required parameter 'update_collection_permissions_request' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'update_collection_permissions_request' when calling MultiRoleFeatureApi.update_collection_permissions" end # resource path local_var_path = '/api/projects/{projectId}/multi-role/roles/{roleSlug}/collections/{collectionId}/permissions'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)).sub('{' + 'roleSlug' + '}', CGI.escape(role_slug.to_s)).sub('{' + 'collectionId' + '}', CGI.escape(collection_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body() # return_type return_type = opts[:debug_return_type] || 'ApplyRoleFeaturePreset200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.update_collection_permissions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleFeatureApi#update_collection_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_multi_role_settings(project_id, update_multi_role_settings_request, opts = {}) ⇒ UpdateMultiRoleSettings200Response
Update multi-role feature settings
Update multi-role feature settings for a project: enable/disable the feature, set which app role is the default at signup, and tune settings (allowMultipleRoles, requireRoleSelection, autoAssignDefault). This endpoint does not edit role definitions or permissions — use POST/PATCH .../multi-role/roles for that (same shape as Add custom role). Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.
762 763 764 765 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 762 def update_multi_role_settings(project_id, update_multi_role_settings_request, opts = {}) data, _status_code, _headers = update_multi_role_settings_with_http_info(project_id, update_multi_role_settings_request, opts) data end |
#update_multi_role_settings_with_http_info(project_id, update_multi_role_settings_request, opts = {}) ⇒ Array<(UpdateMultiRoleSettings200Response, Integer, Hash)>
Update multi-role feature settings Update multi-role feature settings for a project: enable/disable the feature, set which app role is the default at signup, and tune `settings` (`allowMultipleRoles`, `requireRoleSelection`, `autoAssignDefault`). This endpoint does not edit role definitions or permissions — use `POST/PATCH .../multi-role/roles` for that (same shape as Add custom role). Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.
773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 773 def update_multi_role_settings_with_http_info(project_id, update_multi_role_settings_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.update_multi_role_settings ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleFeatureApi.update_multi_role_settings" end # verify the required parameter 'update_multi_role_settings_request' is set if @api_client.config.client_side_validation && update_multi_role_settings_request.nil? fail ArgumentError, "Missing the required parameter 'update_multi_role_settings_request' when calling MultiRoleFeatureApi.update_multi_role_settings" end # resource path local_var_path = '/api/projects/{projectId}/multi-role/settings'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_multi_role_settings_request) # return_type return_type = opts[:debug_return_type] || 'UpdateMultiRoleSettings200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.update_multi_role_settings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleFeatureApi#update_multi_role_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_project_role(project_id, role_slug, update_project_role_request, opts = {}) ⇒ ApplyRoleFeaturePreset200Response
Update role configuration
Partial update of an app role. featurePermissions keys must match the app-role gate map (services/appRoleFeatureMap.js); schema: components/schemas/AppRoleFeaturePermissions.
837 838 839 840 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 837 def update_project_role(project_id, role_slug, update_project_role_request, opts = {}) data, _status_code, _headers = update_project_role_with_http_info(project_id, role_slug, update_project_role_request, opts) data end |
#update_project_role_with_http_info(project_id, role_slug, update_project_role_request, opts = {}) ⇒ Array<(ApplyRoleFeaturePreset200Response, Integer, Hash)>
Update role configuration Partial update of an app role. `featurePermissions` keys must match the app-role gate map (`services/appRoleFeatureMap.js`); schema: `components/schemas/AppRoleFeaturePermissions`.
849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 849 def update_project_role_with_http_info(project_id, role_slug, update_project_role_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.update_project_role ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleFeatureApi.update_project_role" end # verify the required parameter 'role_slug' is set if @api_client.config.client_side_validation && role_slug.nil? fail ArgumentError, "Missing the required parameter 'role_slug' when calling MultiRoleFeatureApi.update_project_role" end # verify the required parameter 'update_project_role_request' is set if @api_client.config.client_side_validation && update_project_role_request.nil? fail ArgumentError, "Missing the required parameter 'update_project_role_request' when calling MultiRoleFeatureApi.update_project_role" end # resource path local_var_path = '/api/projects/{projectId}/multi-role/roles/{roleSlug}'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)).sub('{' + 'roleSlug' + '}', CGI.escape(role_slug.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_project_role_request) # return_type return_type = opts[:debug_return_type] || 'ApplyRoleFeaturePreset200Response' # auth_names auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.update_project_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleFeatureApi#update_project_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |