Make FBA web parts invisible to FBA users in sharepoint site collection

Dec 7, 2011 at 2:47 PM

Dear developers,

We have inserted your FBA "User management" web parts ("Change password" and "Password recovery") in our sharepoint site collection Home page and it work fine and thank you for this solution.

But this is my question here will be possible to hide these  "Change password" and "Password recovery" web parts so that it will be visible only for FBA users coming to site collection and invisble for Windows authentication users logging to our site from AD?

Is any method we could apply or settings exists somewhere?

If it could be done right in code could you please point out the code strings we have to add and where exactly in source code?

Great thanks in advance to anyone who will be so kind and smart to share this with me.

 

Kidn regards,

Laura

 

 

Coordinator
Dec 7, 2011 at 2:52 PM

If you have all of the FBA Users belonging to specific SharePoint group, you can set the audience property of the web part to that group, so only members of that group see the web part:

http://office.microsoft.com/en-us/sharepoint-server-help/target-a-web-part-to-a-specific-audience-HA010168840.aspx

Dec 8, 2011 at 2:06 PM
Edited Dec 8, 2011 at 2:18 PM

ccoulson,

Thank you very much for your reply. Unfortunatelly, I haven't found a Target Audiences box in web part settings.

I've found an alike article for SP 2010 http://msdn.microsoft.com/en-us/library/ee906649.aspx but it's usless.

I'm using SP 2010. Have you hidden Target Audiences box in programming code of the Change Password web part?

Coordinator
Dec 8, 2011 at 4:02 PM

I'm guessing you're using SharePoint foundation - Audience Targetting is a feature of Standard and Enterprise.

Dec 9, 2011 at 6:44 AM

Thaks a lot for advising me.

I will check on Standard Sharepoint and ket you know,.

cheers

Dec 15, 2011 at 1:58 PM
Edited Dec 15, 2011 at 1:59 PM

OK, thanks a lot!

That works for SharePoint server 2010! But Target Audience works only with groups (not single users).

Coordinator
Dec 15, 2011 at 2:03 PM

That's right - so if you want the web part only to be visible to FBA users you have to add them all to a group and set the target audience to that group.