Hi,
I have a visual webpart which is added to a wiki page. The visual webpart has few controls and entering the values and clicking on submit button, I am saving the data to a custom list.
When the data is saved to custom list, a email is send to the user with the visual webpart Page URL to view the saved item.
I am also breaking the Role permission and setting permission to list item to few users, before the email is send.
So, when an user opens the list(who does not have permission on the listitem) , the listitem is not shown. However, if the user has permissions in the site, and if they get the email clicking on that, the visual webpart page is shown with the saved data. I would like to restrict that. If an user does not have permission on the listitem, the user should not be able to see the contents of visual web part page as well. I mean, Access denied.
How to check if the user who is opening the page has the permission to the list item?
Thanks