Skip to main content

Cloud

Content Query Web Part and Security Trimming

The more I use the Content Query Web Part (aka CQWP or CQW), the more I love it. The sheer power of this web part coupled with some great articles on how to customize the look and feel of the web part (Heather Solomon Article and the Microsoft Enterprise Content Management (ECM) Team Article) make is the Swiss Army® knife of the SharePoint world.

I was asked by a customer if this web part would handle security trimming. My gut feeling was that yes it would handle security trimming seamlessly so that if a user didn’t have at least read access to an item in the web part they would not see it in the web part.

Being the engineer that I am coupled with my experience with forms based login (see article here); I decided to test out my theory to make sure I was right. It never hurts to make sure that things your think are true are actually true.

Here is the setup:

User 1 has read access to Site 1 and Site 2. User 2 has read access to Site 1 and Site 3.

After getting it all set up, I ran my tests and sure enough the results were as expected. When User 1 viewed the web part, they only saw Page 1 and when User 2 viewed the web part, they only saw Page 2.

Mission accomplished! Hurray for the Content Query Web Part!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Dave Scheele

More from this Author

Follow Us