I want to restrict users from accessing a list. I have a custom webpart that accesses that list. But if I restrict the access, the code also cannot access it and throws exception.
So is there any way out so that user cannot access the list through browser but the Webpart accessed by the user can?