siteCollection returns permissions error

I was trying to get the subwebs of a site collection by using AllWebs(), but was getting a permissions error when running the code as a non-Admin, even though that user had read permissions on all of the subWebs in the collection.

Thanks to a helpful person on a BB, the solution was to use GetSubWebsForCurrentUser() (…) instead of AllWebs().


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s