Targeting webparts on audiences displays webpartbar for non-audience users

Yesterday, one of our clients wanted to target a webpart on their SPS server to a specific audience. Sure enough this is simply done by use the ‘Audience’ button on the Webpart properties. To my surprise after enabling this feature I got a call from another user (which was not a member of the audience) telling me a webpartbar ‘had suddenly appeared’ on their portal.


I quickly found out that the non-audience-member users could not see the actual contents of the webparts but were still seeing the webpartbar.


Offcourse our client wasn’t satisfied with this situation so I was told to figure out what was going wrong 🙂 After a few minutes I found out that the property ‘Webpart is allowed to close’ was set to false on this webpart. Apparently Sharepoint uses the ‘close webpart’ function internally if you should not see a webpart because of your audience membership!