Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Renaming Document library - why in object model it refer old name ?

  Asked By: Jesse    Date: Nov 10    Category: Sharepoint    Views: 9556

I am Checking for Top level Site document library and it's Rights using
followin code in wss 2.0

But my problem is that if anybody rename the document libray it will no
check the user and it's rights
in object model it refer as old document library name
//code to add document library user rights in audit report.
foreach(SPFolder DocLibfolder in myweb1.Folders)
if(myweb1.Url.IndexOf("sites")>-1 )
SPSite siteCollection = new SPSite(myweb1.Url);
SPWeb site = siteCollection.OpenWeb();
//if(DocLibfolder.Exists) //Not Required
SPList list = site.Lists[*DocLibfolder.Name*];

SPPermissionCollection perms = list.Permissions;
SPUserCollection users = site.Users;

Any solution for this ??



No Answers Found. Be the First, To Post Answer.