Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

SPListCollection how to programmatically get SPList items according to user permissions

$
0
0

Hi, 

  I'm writing a Web Part that generates a menu from a SPList. Something like this:

    SPListItemCollection menuList = mySite.Lists["Menu"].Items;

   foreach (SPListItem menuItem in menuList)

   {

        //I create here the html control and add it to the web part.    }

  The problem is that when I remove all the permissions from one of the list items I still see it in the generated web part menu. That is, it seems that my SPListITemCollection contains items that I´m not allowed to see. How can I create a menu based only on those SPList items that I´m allowed to see?

Thanks in advance, 

 Paola




Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>