Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Rationalize what happens when you have filter attributes on a page model or handler method #6334

Closed
rynowak opened this issue May 26, 2017 · 3 comments

Comments

@rynowak
Copy link
Member

rynowak commented May 26, 2017

Right now any filter attributes on a pagemodel class or handler method are just ignored.

If we can't support this we should make it throw.

@Eilon
Copy link
Member

Eilon commented Jun 9, 2017

Discussed with @rynowak ...

  1. Can decorate a PageModel with filters, and they will work as expected
  2. Cannot use filters within the CSHTML file because there's no syntax for that. Might happen in the future
  3. Will not try to detect "improper" usage of filters. If you're holding it wrong, you're holding it wrong.

@Eilon Eilon moved this from Design to Ready in Razor Pages 2.0.0-preview3 Jun 9, 2017
@rynowak rynowak moved this from Ready to Working in Razor Pages 2.0.0-preview3 Jun 26, 2017
@rynowak
Copy link
Member Author

rynowak commented Jun 27, 2017

Assigning this to the person already working on it #6417

@rynowak rynowak removed their assignment Jun 27, 2017
@rynowak rynowak moved this from Working to Done in Razor Pages 2.0.0-preview3 Jun 29, 2017
@poke
Copy link
Contributor

poke commented Feb 1, 2018

Hey @pranavkm, I just found this issue via 8df3032 and have a question:

I am trying to retrieve the filter metadata for a razor page by inspecting the action descriptors from IActionDescriptorCollectionProvider. However, due to this line, the filter descriptor collection is always empty.

This works perfectly fine for controller actions but from the change it seems that this only works from within the CompiledPageActionDescriptor? Is this really intended that page actions are incompatible to this filter metadata infrastructure? What would be the way to retrieve all page actions then including the applied filters?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

No branches or pull requests

4 participants