z0mb
✅ ASP Core Attribute Logic Help
Verify they are logged in : I would just use the built in [Authorize] vs [AllowAnonymous]
Verify they are accessing a dashboard that exists:
Verify they are accessing a dashboard they have authorization to view:
Verify for some routes the Dashboard has a connected StripeAccount:
https://paste.mod.gg/xtgdonyhekrc/0
6 replies
✅ ASP Core Attribute Logic Help
Couldn't you just have one attribute, and pass in some parameters to configure what exactly you need for that specific endpoint? Then you can logically determine if they should be able to access the endpoint based off of your requirements and the provided parameters? That would avoid multiple unnecessary DB calls.
6 replies