dsuryd / dotNetify

Simple, lightweight, yet powerful way to build real-time web apps.
https://dotnetify.net
Other
1.17k stars 164 forks source link

Filters do not get executed when VM is attached using the Scope element (Vue) #226

Closed marcotana closed 4 years ago

marcotana commented 4 years ago

Using the CompositeView component in Vue, when putting the [Authorize] attribute on a VM that connects using the Scope element, the corresponding AuthorizeFilter doesn't get executed.

1: Add [Authorize] on the CompositeViewVM class.

  1. Put a breakpoint on the "var principal" line in the AuthorzieFilter class. 3: Debug to run the solution. 4: Visit the CompositeView sample. The breakpoint doesn't pause the execution.
  2. Stop debugging.

Now, if you put the [Authorize] attribute on the MovieTableVM class, the breakpoint will pause execution. The difference is that the MovieTableVM is connected using the "vm.connect" API.