Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

User rights

  Asked By: Loren    Date: Mar 08    Category: Sharepoint    Views: 1378

Is there not even a single person in our group who has worked on
authorization/authentication in SPS 2003???

If someone knows anything about this please help me. it is very urgent...

the problem is the webpart developed by me to crawl all the WSS sites and get
the latest announcements in them works fine for me because i am the
AdmInistrator. But if a user who does not have rights to some of the WSS sites
tries opening the page containing the webpart, the login dialog is popped and is
denied access. To avoid this all i need to do Is find out the list of WSS sites
that the current user has access to.



2 Answers Found

Answer #1    Answered By: Jeffrey King     Answered On: Mar 08

if you want to iterate through each site for the current user  , you can use the GetSubwebsForCurrentUser method of the SPWeb class.

After you just have to test the List.BaseType property and so on ...

Answer #2    Answered By: Kendrick Townsend     Answered On: Mar 08

This method GetSubwebsForCurrentUser always returns an SPWebCollection object
immaterial of the user  having rights  or not. But when i try to access  the
webCollection.Count it raises an exception., i.e.

the condition if ( !webCollection ) or if ( webCollection!=null ) evaluates to

but if you try to do a webCollection.Count it throws an exception.

So how do i check if the SPWebCollection object is usable or not?

Didn't find what you were looking for? Find more on User rights Or get search suggestion and latest updates.