The popular NotFound handler for ASP.NET Core and Optimizely, enabling better control over your 404 page in addition to allowing redirects for old URLs that no longer works.
I'd like to restrict access to redirects based on website and roles.
Our solution has multiple websites with separate roles for access. For example if account has a roleX with access only to websiteX, then only redirects of websiteX should be visible and editable.
I thought about using services.Intercept to intercept IRedirectsService (or even more interfaces if required) and changing returned results based on current url, matched website and current user roles.
Is there a better way to do this than intercepting service? Or could be that there are plans for implementing restrictions?
Hi! No there are no plans to make more granular access rights. That is not a common requirement.
And sure you can decorate IRedirectsService and filter results based on your needs.
Hi,
I'd like to restrict access to redirects based on website and roles.
Our solution has multiple websites with separate roles for access. For example if account has a roleX with access only to websiteX, then only redirects of websiteX should be visible and editable.
I thought about using services.Intercept to intercept IRedirectsService (or even more interfaces if required) and changing returned results based on current url, matched website and current user roles.
Is there a better way to do this than intercepting service? Or could be that there are plans for implementing restrictions?
Example code which I though of can be find here on my post in Optimizely forum.
Hopefully @marisks you're best person to help
Thank you