질문하기질문하기
 

답변됨help me please .....

  • 2009년 4월 27일 월요일 오후 12:23jsaumy 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    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......

답변

모든 응답