Starcounter/Starcounter.Authorization

Recursive view model results in PageSecurity infinite recursion

Opened this issue · 2 comments

Authorization goes into infinite recursion on recursively defined view models.

Example of problematic view model:

// View model `App.FooViewModel`
{
    "NodeTemplate": {
        // ...
       "Children": [
            {
                "$": {
                    "Reuse": "App.FooViewModel.NodeTemplateJson"
                }
            }
       ]
    }
}

I have fixed the case with the nested array of the same type, but it still fails with nested object of the same type, this still fails:

"Children": {
    "$": {
        "Reuse": "App.FooViewModel.NodeTemplateJson"
    }
}

Current fix will be available in 3.8.1 version.

The issue is currently on hold due to a bug / limitation in Starcounter.XSON. The constructions specified in the comment above are not supported.