help me please .....<p>I 've used this code to change the assigned role to an item in the list test</p> <p>            web.AllowUnsafeUpdates = true;</p> <p> </p> <p>            SPListItem itm = web.Lists[&quot;test&quot;].GetItemById(ListItem);</p> <p>            itm.BreakRoleInheritance(true);</p> <p>            while (itm.RoleAssignments.Count &gt; 0)</p> <p>            {</p> <p>                itm.RoleAssignments.Remove(itm.RoleAssignments.Count - 1);</p> <p>            }</p> <p>            string[] UsersCol = users.Split(&quot;;&quot;.ToCharArray());</p> <p> </p> <p>            foreach (string UserString in UsersCol)</p> <p>            {</p> <p>                SPRoleAssignment rol = new SPRoleAssignment(UserString, &quot;&quot;, &quot;&quot;, &quot;&quot;);</p> <p>                rol.RoleDefinitionBindings.Add(web.RoleDefinitions[&quot;Full Control&quot;]);</p> <p>                itm.RoleAssignments.Add(rol);</p> <p>                itm.Update();</p> <p>            }</p> <p>            web.AllowUnsafeUpdates = false;</p> <p>this code works well and the items are hidden to all users but only the (UsersCol)..</p> <p>but then I tried to use Export to SpreadSheet action from the toolbar, and opened the query on Excel .......!!!</p> <p>surprise!!! I can see all the items even I don't have any permission on them..</p> <p>The same issue happened also with Connect to Outlook action in Document Libraries ....</p> <p><br/>please help me ASAP......</p>© 2009 Microsoft Corporation. All rights reserved.Thu, 30 Apr 2009 00:57:59 Z52b0d679-3b4b-4dd9-b00f-88b17d5aa239http://social.msdn.microsoft.com/Forums/en-US/os_sharepoint/thread/52b0d679-3b4b-4dd9-b00f-88b17d5aa239#52b0d679-3b4b-4dd9-b00f-88b17d5aa239http://social.msdn.microsoft.com/Forums/en-US/os_sharepoint/thread/52b0d679-3b4b-4dd9-b00f-88b17d5aa239#52b0d679-3b4b-4dd9-b00f-88b17d5aa239jsaumyhttp://social.msdn.microsoft.com/Profile/en-US/?user=jsaumyhelp me please .....<p>I 've used this code to change the assigned role to an item in the list test</p> <p>            web.AllowUnsafeUpdates = true;</p> <p> </p> <p>            SPListItem itm = web.Lists[&quot;test&quot;].GetItemById(ListItem);</p> <p>            itm.BreakRoleInheritance(true);</p> <p>            while (itm.RoleAssignments.Count &gt; 0)</p> <p>            {</p> <p>                itm.RoleAssignments.Remove(itm.RoleAssignments.Count - 1);</p> <p>            }</p> <p>            string[] UsersCol = users.Split(&quot;;&quot;.ToCharArray());</p> <p> </p> <p>            foreach (string UserString in UsersCol)</p> <p>            {</p> <p>                SPRoleAssignment rol = new SPRoleAssignment(UserString, &quot;&quot;, &quot;&quot;, &quot;&quot;);</p> <p>                rol.RoleDefinitionBindings.Add(web.RoleDefinitions[&quot;Full Control&quot;]);</p> <p>                itm.RoleAssignments.Add(rol);</p> <p>                itm.Update();</p> <p>            }</p> <p>            web.AllowUnsafeUpdates = false;</p> <p>this code works well and the items are hidden to all users but only the (UsersCol)..</p> <p>but then I tried to use Export to SpreadSheet action from the toolbar, and opened the query on Excel .......!!!</p> <p>surprise!!! I can see all the items even I don't have any permission on them..</p> <p>The same issue happened also with Connect to Outlook action in Document Libraries ....</p> <p><br/>please help me ASAP......</p>Mon, 27 Apr 2009 12:23:09 Z2009-04-27T12:23:09Zhttp://social.msdn.microsoft.com/Forums/en-US/os_sharepoint/thread/52b0d679-3b4b-4dd9-b00f-88b17d5aa239#fb512b09-0539-4e2c-9c0e-eb2ea7609256http://social.msdn.microsoft.com/Forums/en-US/os_sharepoint/thread/52b0d679-3b4b-4dd9-b00f-88b17d5aa239#fb512b09-0539-4e2c-9c0e-eb2ea7609256John Dunninghttp://social.msdn.microsoft.com/Profile/en-US/?user=John%20Dunninghelp me please .....Hello jsaumy,<br/>This forum is for helping customers interoperate with Microsoft Products via our Open Protocol Documentation. Information on this program can be found here: <a href="http://www.microsoft.com/protocols/default.mspx">http://www.microsoft.com/protocols/default.mspx</a> and the documentation itself can be found here: <a href="http://msdn.microsoft.com/en-us/library/cc203350.aspx">http://msdn.microsoft.com/en-us/library/cc203350.aspx</a>. Your issue does not appear to be related to our protocol documentation. However, there is a forum for development and programming against a SharePoint installation which can be found here: <a href="http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/threads/">http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/threads/</a>.  I hope that this information is helpful for answering your post.<br/><br/>Thanks<br/>John Dunning<br/>Senior Escalation Engineer Microsoft Corporation<br/>US-CSS DSC PROTOCOL TEAM<br/>Mon, 27 Apr 2009 15:37:20 Z2009-04-27T15:37:20Z