-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Integrate authorization into Blazor router #10491
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
Conversation
On a design point, I want to emphasise that when authorization fails, although we don't display the page we do still use the layouts nominated by that page. This is because what other layout would we use? We can either:
I'd lean towards the second option, but not blocking the merging of this PR for it. |
f14a3f0
to
f63cdce
Compare
d1e1acd
to
a0e8506
Compare
ea2b53a
to
d302bec
Compare
This moved PageLayout out of the Layouts namespace, but failed to update the file location or the ref assembly. |
@CornedBee Thanks for letting us know! Could you please open an issue for this so that we can track it? |
@danroth27 #11240 is essentially this, except the reporter apparently found a workaround for his use case and closed the bug. Maybe you can reopen it? If not, I can create a new one. |
@CornedBee Thanks for bringing this to our attention! I've reopened #11240 so that we can address this. |
Tests are in progress, but this does work.Update: tests are done and this is ready. This builds on my previous PR, #10487Posting the PR a bit early in case anyone sounds any alarms about the way it determines what authorization attributes to apply (I've done it in a very simple way, but it's hard to compare against the giant metadata system used for controllers/pages).