(remotingContext, authorizedRoles)
| 540 | }; |
| 541 | |
| 542 | function saveAuthorizedRolesToRemotingContext(remotingContext, authorizedRoles) { |
| 543 | const options = remotingContext && remotingContext.args && remotingContext.args.options; |
| 544 | // authorizedRoles key/value map is added to the options argument only if |
| 545 | // the latter exists and is an object. This means that the feature's availability |
| 546 | // will depend on the app configuration |
| 547 | if (options && typeof options === 'object') { // null is object too |
| 548 | options.authorizedRoles = authorizedRoles; |
| 549 | } |
| 550 | } |
| 551 | |
| 552 | /** |
| 553 | * Check if the given access token can invoke the method |
no outgoing calls
no test coverage detected
searching dependent graphs…