Hi Paul, I'm trying to build a relatively simple Web Part that provides a dynamic list of sub-sites of the current site that the currently authenticated user has access to. So I'm trying to invoke this query programmatically from within a web part and display the results.
So I'm very happy to be told that I'm doing this the hard way; it's just that I *assumed *using a search-based approach would be more efficient than a "brute-force" (and recursive) traversal of the appropriately security-trimmed sub-site collections. Does that make sense? And of course if I'm missing the bleeding obvious, and there's a much easier way to achieve this that I've overlooked, please let me know! I must admit just now looking at whether I can traverse the "AllWebs" collection of the Site Collection the site belongs to and a) seeing if those sites URL's are "based" below the current site, and b) does the current user have access to them, but once again this seems really brute force. Cheers, Trevor On 20 June 2014 15:10, Paul Noone <p.no...@keller.com.au> wrote: > Trevor, > > > > It’s an annoying change to how we used to work. My greatest gripe is that > you can’t add a search box and results web part to a page and have it > return nothing until a query term is entered. > > > > How and where are you applying your query? > > > > You could add this as a new content source, or apply it directly to a > search results web part with less struggle. > > > > I’ve even had some success passing query string parameters through to a > results page from a hyperlink. But the docos are so sketchy that it becomes > a painful result of trial and error. > > > > *From:* ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] *On > Behalf Of *Trevor Andrew > *Sent:* Friday, 20 June 2014 2:48 PM > *To:* ozmoss@ozmoss.com > *Subject:* [SP2013] Search (or alternative techniques) - Finding current > user's accessible sites > > > > Hi All, > > > > I may be barking up the wrong tree here, but I've found this Full Text > Search query which purports under 2010 to determine the child sites > accessible to a user from the current site context: > > > > Select url, title > > From Scope() > > Where Scope = ‘All Sites’ > > And (ContentClass = ‘STS_Site or ContentClass = ‘STS_Web’) > > > > Not having too much joy "migrating" this sort of query to the context of > 2013 for a number of reasons, and wondering whether someone else has got a > better approach. > > > > With Scopes replaced with Result Sources, it isn't clear to me whether I > should create a Result Source that equates to the old "All Sites" scope, or > whether there is simply a better way to dynamically, simply and obviously > efficiently obtain a list of Child Sites that the currently logged on user > has permission to access. > > > > Any help appreciated. > > > > Cheers, > > Trevor > > > > > > The content of this email is confidential to the intended recipient at the > email address to which it has been addressed. It may not be disclosed to, > or used by, anyone other than this addressee, nor may it be copied in any > way. If received in error, please contact the author and then delete the > message from your system. > Please note that neither Keller Australia nor the sender accepts any > responsibility for viruses and it is your responsibility to scan the email > and attachments (if any). > Visit http://www.keller.com.au/ for more information. > ------------------------------ > > This e-mail message has been scanned for Viruses and Content and cleared > by *MailMarshal * > ------------------------------ > > _______________________________________________ > Sponsored by Infotext - Amazing Search for Microsoft SharePoint - > http://www.infotext.com/ > ozmoss mailing list > ozmoss@ozmoss.com > http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss >
_______________________________________________ Sponsored by Infotext - Amazing Search for Microsoft SharePoint - http://www.infotext.com/ ozmoss mailing list ozmoss@ozmoss.com http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss