help me please .....
I 've used this code to change the assigned role to an item in the list test
web.AllowUnsafeUpdates = true;
SPListItem itm = web.Lists["test"].GetItemById(ListItem);
itm.BreakRoleInheritance(true);
while (itm.RoleAssignments.Count > 0)
{
itm.RoleAssignments.Remove(itm.RoleAssignments.Count - 1);
}
string[] UsersCol = users.Split(";".ToCharArray());
foreach (string UserString in UsersCol)
{
SPRoleAssignment rol = new SPRoleAssignment(UserString, "", "", "");
rol.RoleDefinitionBindings.Add(web.RoleDefinitions["Full Control"]);
itm.RoleAssignments.Add(rol);
itm.Update();
}
web.AllowUnsafeUpdates = false;
this code works well and the items are hidden to all users but only the (UsersCol)..
but then I tried to use Export to SpreadSheet action from the toolbar, and opened the query on Excel .......!!!
surprise!!! I can see all the items even I don't have any permission on them..
The same issue happened also with Connect to Outlook action in Document Libraries ....
please help me ASAP......
Antworten
- Hello jsaumy,
This forum is for helping customers interoperate with Microsoft Products via our Open Protocol Documentation. Information on this program can be found here: http://www.microsoft.com/protocols/default.mspx and the documentation itself can be found here: http://msdn.microsoft.com/en-us/library/cc203350.aspx. 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: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/threads/. I hope that this information is helpful for answering your post.
Thanks
John Dunning
Senior Escalation Engineer Microsoft Corporation
US-CSS DSC PROTOCOL TEAM- Als Antwort markiertAlex MorrillMSFT, ModeratorDonnerstag, 30. April 2009 00:57
Alle Antworten
- Hello jsaumy,
This forum is for helping customers interoperate with Microsoft Products via our Open Protocol Documentation. Information on this program can be found here: http://www.microsoft.com/protocols/default.mspx and the documentation itself can be found here: http://msdn.microsoft.com/en-us/library/cc203350.aspx. 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: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/threads/. I hope that this information is helpful for answering your post.
Thanks
John Dunning
Senior Escalation Engineer Microsoft Corporation
US-CSS DSC PROTOCOL TEAM- Als Antwort markiertAlex MorrillMSFT, ModeratorDonnerstag, 30. April 2009 00:57

