Site listing per user web part?
Does anyone know of a webpart that list the sites a user has access to?
For example user a has access to
site 1
site 2
site 3
User 2 has access to
site 3
site 4
I would like a list to show the sites the current logged in user has access to, so when user 2 logs in he sees
site 3
site 4
everything else will be hidden.
Thanks!
May 3rd, 2011 8:49am
This question is in the "Design and Customization" section, so I'm assuming you want to know how to do this without writing custom web part in managed code?
What you are asking IS possible using SPServices (http://spservices.codeplex.com). It would most likely not be a performant script, but the steps you would take are:
1) Find the Current User:
http://spservices.codeplex.com/wikipage?title=$().SPServices.SPGetCurrentUser&referringTitle=Documentation
2) Find a list of all the sites in the site collection:
http://msdn.microsoft.com/en-us/library/webs.webs.getallsubwebcollection.aspx
2) For each site, find all the users and see if the current user is one of the users
http://msdn.microsoft.com/en-us/library/ms772661.aspx
3) If user is one of users show link to site retrieved from #2
There MAY be a Web Service that checks to see if a user has permissions a site you don't have to iterate through the users, but I don't know off the top of my head.
Alternatively, look at codeplex.com to see if anyone has written such a web part.. that might be easier. :)
Good luck!
Mark
Free Windows Admin Tool Kit Click here and download it now
May 3rd, 2011 10:24am
>This question is in the "Design and Customization" section, so I'm assuming you want to know how to do this without writing custom web part in managed code?
Actually he says he is looking for a ready-made web part,
"Does anyone know of a webpart that list the sites a user has access to?"
so I'm moving it to the General forum. I suspect the design/customization forum was selected incorrectly.
ModeratorSP 2010 "FAQ" (mainly useful links):
http://wssv4faq.mindsharp.com/default.aspx
WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
Both also have links to extensive book lists and to (free) on-line chapters
May 3rd, 2011 10:27am
There is something applicable for MySites, call the SharePoint Sites web part that shows which sites the current user has access too. I'm not sure on the best way to move this to a site collection, but in having a quick look I did see this.
http://www.threewill.com/home/free-resources/sharepoint-sites-webpart/
I can't vouch for it though, so the community might be interested in knowing your thoughts if you get it to work.Steven Andrews | SharePoint Professional | http://www.twitter.com/backpackerd00d | https://baron72.wordpress.com/
Free Windows Admin Tool Kit Click here and download it now
May 3rd, 2011 10:42am
ok guys thanks for all the pointers, i'll have a play around and report back my findings :-)
May 3rd, 2011 10:53am
Depending on your IA, you might get away with using the Table of Contents web part? Security trimming would take care of displaying the sites the user has access to.Paul Olenick SharePoint/FAST Architect , MCTS http://olenicksharepoint.wordpress.com/
Free Windows Admin Tool Kit Click here and download it now
May 3rd, 2011 11:11am
I've used the "Membership" web part. The main limitation is that it only lists sites in which the current user is explicitly added as a member (meaning it does not list sites a user has access to by virtue of being in a group that has access to the
site).
Paul Olenick SharePoint/FAST Architect , MCTS http://olenicksharepoint.wordpress.com/
May 3rd, 2011 11:19am
I've used this web part. The main limitation is that it only lists sites in which the current user is explicitly added as a member (meaning it does not list sites a user has access to by virtue of being in a group that has access to the site).Paul Olenick SharePoint/FAST Architect , MCTS http://olenicksharepoint.wordpress.com/
Free Windows Admin Tool Kit Click here and download it now
May 3rd, 2011 11:20am
thanks for the tip Paul, i will give this a try.
May 3rd, 2011 11:47am
Hi Novak1984,
Here is a solution work with Search Core Result web part.
Web Part: Sites that I have access to
And you can also try this using the search index, and web services to get a list of all sites that the current user has access to.
Create a SharePoint Global Site Directory
Here are some similar threads for your refer.
http://social.msdn.microsoft.com/Forums/en/sharepointcustomization/thread/9725122d-7663-43d6-bed1-a3e3e055f5b6
http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/8f52fa4c-635a-417f-a4ba-0386b630c20e/
Best regards,
Emir
Free Windows Admin Tool Kit Click here and download it now
May 5th, 2011 2:43am