View the webpart only if permission

Feb 13, 2009 at 3:51 PM
Hello,

first, I would like to say that your webpart is exactly what I was looking for, it's great !!

The only problem I've got with it is coming from permissions.
I already use the Bewise Roleviewer manager , in order to hide the webparts if the user has no permission to see the related library or list.
It works pretty well, but not with the DocumentLibrary Browser one... (I use the Static one on a WSS 3 sp1 installation)
the webpart is always visible, displaying an error :

Error : FillTreeView.
System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.SPListCollection.GetListByName(String strListName, Boolean bThrowException) at Microsoft.SharePoint.SPListCollection.get_Item(String strListName) at Stramit.WP.DocumentLibraryBrowser.FillTreeView()

Do you know how I can resolve this problem ? If it's possible ?
I'm not really an expert with the source code ;-((

Thanks a lot in advance.