Ahh, it looks like I've misunderstood how the .NET Core Authorize attribute works. I've applied it twice, once with the settings section policy and once with the commerce section policy and I assumed these would be checked in an OR manor, but it looks like it checks them in an AND manor.
I've created a new policy now for SettingsOrCommerce section checking and have updated all the locations where I previously had 2 Authorize attributes.
User cannot delete orders/carts
Hi,
When a user has access to the 'commerce' section, it is not possible to delete orders/carts. It shows an error 'unauthorized access'.
But when adding the 'settings' section it is possible.
Is this a bug or supposed to be like this? I do not want the user to be able to go into website settings section.
Thanks for any feedback.
What version of Vendr are you using?
Umbraco v10.1.1 & Vendr v3.0.5
Ahh, it looks like I've misunderstood how the .NET Core
Authorize
attribute works. I've applied it twice, once with the settings section policy and once with the commerce section policy and I assumed these would be checked in an OR manor, but it looks like it checks them in an AND manor.I've created a new policy now for
SettingsOrCommerce
section checking and have updated all the locations where I previously had 2Authorize
attributes.If you want to test this fix, there is a new 3.0.6-beta0006 build on our unstable feed at https://nuget.outfield.digital/unstable/vendr/v3/index.json
is working on a reply...