1

I have a site collection with a lot (1000+) of publishing sites in it. Basically, I want to list all pages library that the user has access to. The pages library don't always have the same permissions set as its parent web.

Since there are tons of sites, it's not efficient to run through all webs to investigate the permissions.

I've tried to use the SPDataSoruce object with ListOfLists mode set, but it only searches within a web.

Does anyone know if it's possible to make an efficient search after lists in a site collection?

Thanks!

cpx
  • 17,009
  • 20
  • 87
  • 142
Apan
  • 11
  • 1
  • Can I ask what you're attempting to do - is it some sort of audit of who has permissions for what (where speed is less important) or could you pre-calculated for quick display (where list may be a little out of date). – Ryan Nov 08 '11 at 13:08

1 Answers1

0

If the SP Object Model is too slow for this purpose, your only option will be to query the SP Database directly... however, this is unsupported by MS (CRUD operations) and future updates or service pack's may break your code/query. Read here for further information.

What you are trying to archive is rather unique, so you probably will have to come up with a query yourself... the database schema is quite complex but here is a good overview for site collections/sites.

And what exactly do you mean with 'not efficient'? How long does the code run/do you get any timeouts? In which context (web, console, event receiver etc.) is it running?

Maybe you could post the code here so we can have a look and make it efficient enough (if possible).

Community
  • 1
  • 1
int32
  • 1,687
  • 1
  • 10
  • 6