New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Projects
4 participants
@rynowak
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

This comment has been minimized.

Show comment
Hide comment
@Eilon

Eilon Jun 9, 2017

Member

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.
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 added 1 - Ready and removed needs design labels Jun 9, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@rynowak

rynowak Jun 27, 2017

Member

Assigning this to the person already working on it #6417

Member

rynowak commented Jun 27, 2017

Assigning this to the person already working on it #6417

@rynowak rynowak added 2 - Working and removed 1 - Ready labels Jun 27, 2017

@rynowak rynowak removed their assignment Jun 27, 2017

pranavkm added a commit that referenced this issue Jun 28, 2017

@pranavkm pranavkm closed this in 8df3032 Jun 28, 2017

@rynowak rynowak moved this from Working to Done in Razor Pages 2.0.0-preview3 Jun 29, 2017

@poke

This comment has been minimized.

Show comment
Hide comment
@poke

poke 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?

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?

@pranavkm pranavkm added 3 - Done and removed 2 - Working labels Feb 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment