# 5.1.1

### New in 5.1.1

* Possibility to secure the create user (POST /user) API endpoint. This helps prevent external API calls (possibly malicious) from creating users without any authentication. Newly, a user scope can be defined using the API\_USER\_CREATE\_SCOPE system variable which will be required when calling the POST /user endpoint. Typically, an “admin” scope is set so that only admin users can create new user accounts. See <https://docs.appmixer.com/appmixer/tutorials/appmixer-virtual-users> for more information.

<figure><img src="https://1603660091-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgsBalkJKe24AUhfRPojx%2Fuploads%2FMHBMmZ0pj5OTfV03RO6h%2Fimage1.png?alt=media&#x26;token=ffe6f211-fe5a-4ca2-b6de-3a9286f29d8e" alt=""><figcaption></figcaption></figure>

* New connector context function *context.loadOutputSchemaProperties()*, which is now used by the *Each* connector (*Controls* module version 1.4.4). This fixes a few issues:

  * When *Each* connector was used in a loop in the flow, it could cause a crash of an Appmixer engine.
  * Add variable discovery for nested props:

  Given the following output schema, when applying *Each* on "main" it does show the properties of the items in the next step (the next connected connector) in the flow, but applying Each on "sub.subitems" does not display the properties nor Index/Value, as if it doesn't recognize it as an array at all.

```json
   "outPorts": [
        {
            "name": "out",
            "schema": {
                "type": "object",
                "properties": {
                    "main": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "prop": { 
                                    "type": "string", "title": "prop" 
                                }
                            }
                        }
                    },
                    "sub": {
                        "title": "Sub",
                        "type": "object",
                        "properties": {
                            "subitems": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "subprop": { 
                                            "type": "string", 
                                            "title": "subprop" 
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    ]
```

* Fixed a bug where the Appmixer SDK was slow with a large connector definition.
* Fixed a regression in the DELETE /files API endpoint (bug introduced in 5.1.0).
* Fixed a problem with a wrong connector token that was cached. If connector A used another auxiliary connector B in the component.json (typically connector A needs a list of dynamic items to be displayed in the UI and it uses a different connector to populate such a list) and the scope of the tokens for connector A and B - defined in the component.json - was different, then the engine could store the token for B in cache for the connector A. When such a flow was started, it resulted in an error, the cached token for B did not work when the connector A was called with a new message.&#x20;
* Fixed a bug in the Integration Wizard, creating an account did not work if the authentication file (auth.js) was on the module (\[vendor]/\[service]/\[module]/auth.js) level and not the service (\[vendor]/\[service]/auth.js) level.
