I am building a page where a people can comment on the content. I have build the content type for blog post and embedded a partial view with a comment form.
I want to provide ability to comment to a content only to a authenticate member but everybody(even unauthenticated members) can view/read the blog post.
To protect the page, I have used public access node from the admin portal but in this case I only want to implement public access rule to partial page. Any ideas?
If you use public access node then it will make your blog page as private and will not allow user to view the page. And from your comments you don't want it. So, we should remove this check.
Instead, you can simply check if Member is logged in then show partial otherwise show Login screen.
Secure the custom comment form (partial view)
Hello Umbraco Experts,
I am building a page where a people can comment on the content. I have build the content type for blog post and embedded a partial view with a comment form.
I want to provide ability to comment to a content only to a authenticate member but everybody(even unauthenticated members) can view/read the blog post.
To protect the page, I have used public access node from the admin portal but in this case I only want to implement public access rule to partial page. Any ideas?
May be the structure will be something similar to ..... https://stackoverflow.com/questions/57910737/extract-from-a-character-in-r
Hi,
If you use public access node then it will make your blog page as private and will not allow user to view the page. And from your comments you don't want it. So, we should remove this check.
Instead, you can simply check if Member is logged in then show partial otherwise show Login screen.
Hope this helps.
Cheers,
Shaishav
Thanks. I also managed to implement if authenticated user has a permission to comment.
is working on a reply...