Closed jptissot closed 4 years ago
Was able to accomplish this by adding a setting "DisableRedirect" that won't redirect. This gives the widget template the ability to add custom display paths using the roles.
If you want to copy what I did: https://github.com/StatCan/StatCan.OrchardCore/tree/master/src/Modules/Etch.OrchardCore.ContentPermissions
This is a really cool idea. I'm wondering if we could simply check if the content type is a widget, if so then don't do the redirect. Will definitely add the Liquid filter, that would be really useful.
I was toying with that idea but bag items are not always widgets, so I didn't want to force a stereotype.
@jptissot Good point! Think I'm going to make it that if the redirect URL field is empty then no redirect will occur instead of having another field to disable the original field.
Thanks for the suggestion @jptissot 👍
It would be a nice enhancement to be able to hide a ContentItem from flow / bag, with maybe with an optional message that would replace the widget if a user is not permitted.