Return to Jive Software

2,392 Views 17 Replies Last post: Dec 24, 2008 12:52 AM by Chris Attwell RSS
Brad Molander Novice 75 posts since
Jun 17, 2008
Currently Being Moderated

Jul 14, 2008 12:17 PM

Disable User Browsing

Is there a way to disable user browsing so that non-authenticated users cannot see the user listing?

Vinh Jive Employee 12,343 posts since
Apr 1, 2008
Currently Being Moderated
Jul 14, 2008 1:55 PM in response to: Brad Molander
Re: Disable User Browsing

Hey Brad,

 

There's no way to do this out of the box, you'll need to make customizations to the PeopleActions class and check if the current user is a Guest or a Registered User for that to work.

 

Thanks,

Vinh

hazimj Novice 5 posts since
Sep 18, 2007
Currently Being Moderated
Jul 15, 2008 12:02 PM in response to: Brad Molander
Re: Disable User Browsing
You can also do this through FTL customization in Themes.
Vinh Jive Employee 12,343 posts since
Apr 1, 2008
Currently Being Moderated
Jul 15, 2008 3:56 PM in response to: hazimj
Re: Disable User Browsing

I did a little more digging following hazimj's suggestion. You can use the global authentication variable on the template (FTL) level to disallow guests from viewing the People page. You need to implement this theme change to template/global/people.ftl:

 

<#if !(authentication.anonymous)>
PLACE CODE HERE
</#if>

 

Vinh

Nathan Krake Novice 57 posts since
Feb 24, 2008
Currently Being Moderated
Jul 15, 2008 6:12 PM in response to: Vinh
Re: Disable People Browsing

Hi Vinh,

 

This kind of customization would be greatly appreciated.

Is it possible that you could elaborate a little further as to some basic code that we would use/work with?

 

Kind regards

Nathan

Vinh Jive Employee 12,343 posts since
Apr 1, 2008
Currently Being Moderated
Jul 16, 2008 8:25 AM in response to: Nathan Krake
Re: Disable People Browsing

Basically, you cuold wrap that IF condition around the entire people.ftl file. You can also add an ELSE clause that will tell guests that they're not allowed to view this page.

Nathan Krake Novice 57 posts since
Feb 24, 2008
Currently Being Moderated
Jul 16, 2008 8:12 PM in response to: Vinh
Re: Disable People Browsing

Hi Vinh,

 

Thats great.. works well. I'll have to spend sometime working on the else statement (not much a developer), but thats ok.

Kind regards

 

Nathan

Nathan Krake Novice 57 posts since
Feb 24, 2008
Currently Being Moderated
Jul 17, 2008 8:19 AM in response to: Vinh
Re: Disable People Browsing

Hi Vinh,

I thought I would push my luck and ask another question..

Using the If statement you mention, how would I call the  /template/global/unauth.ftl so that the unauthorised page is displayed when a guest clicks on People?

Any tips would be greatly appreciated..

Thanks very much

Nathan

Vinh Jive Employee 12,343 posts since
Apr 1, 2008
Currently Being Moderated
Jul 17, 2008 8:30 AM in response to: Nathan Krake
Re: Disable People Browsing

You'd have to alter the action and rebuild the source to do this correctly. There's another method -- it's a hack but it would be much easier. You can call your <clearspace URL>/login.jspa?authzFailed=true link within the ELSE clause of the people FTL.

Nathan Krake Novice 57 posts since
Feb 24, 2008
Currently Being Moderated
Jul 17, 2008 8:54 AM in response to: Vinh
Re: Disable People Browsing

Hi Vinh,

Thanks for the reply and the suggestions. I have just finished testing the following using the IF/ELSE statement that you suggested..

I implemented the if statement around the people.ftl

<#if !(authentication.anonymous)>
PEOPLE.FTL
<#else>

UNAUTH.FTL
</#if>

I then copied and pasted the code from the  /template/global/unauth.ftl into the Else component of the statement and edited the unauth.ftl content to display a nice message..

So the whole page looks great and performs exactly how we would like it too..

klm_people_registered_only.png

thanks for the great tip and help..

Nathan

Vinh Jive Employee 12,343 posts since
Apr 1, 2008
Currently Being Moderated
Jul 17, 2008 8:56 AM in response to: Nathan Krake
Re: Disable People Browsing

That looks great! I'm glad you got it working.

Nathan Krake Novice 57 posts since
Feb 24, 2008
Currently Being Moderated
Jul 17, 2008 9:11 AM in response to: Vinh
Re: Disable People Browsing

Thanks Vinh..

 

I've also taken that same logic and wrapped it around the Projects & People links on the main page via the Main.FTL template.

 

<#if !(authentication.anonymous)>               
         

<#if projectsEnabled>

<span><a href="<@s.url value="/projects"/>" class="jive-link-project-small"><@s.text name='main.projects.link' /></a></span> </#if>               
<a href="<@s.url value="/people"/>" class="jive-link-people-small"><@s.text name="main.people.link" /></a>

 

</#if>

 

and it works just as I had hoped.. It hides the people and projects link to guest users..

 

Thanks

Nathan

deepa.m Novice 1 posts since
Oct 3, 2008
Currently Being Moderated
Oct 3, 2008 1:32 AM in response to: Nathan Krake
Re: Disable People Browsing

Hi Nathan,

 

I am looking into allow/disallow the anonymous users to take the survey.

It should display a message asking for login if user is not logged in to the system and anonymous users are not allowed to take the survey.

If the anonymous users are allowed, then we should make sure that the data collection process works properly without user login.

how to implement this logic..give me some suggestion and sample code.

 

Thanks,

deepa.

Alex Wenckus Jive Employee 99 posts since
Jun 26, 2007
Currently Being Moderated
Jul 17, 2008 11:58 AM in response to: Brad Molander
Re: Disable User Browsing

I'd like to add that this capabillity will be available in the next major release of Clearspace. For the record the improvement number is CS-4869.

 

Cheers,

Alex

Nathan Krake Novice 57 posts since
Feb 24, 2008
Currently Being Moderated
Oct 3, 2008 1:38 AM in response to: Alex Wenckus
Re: Disable User Browsing

Hi Alex

 

What is the extent of this capability?

 

Cheers

Nathan

Chris Attwell Novice 85 posts since
Jun 11, 2008
Currently Being Moderated
Dec 24, 2008 12:52 AM in response to: Brad Molander
Re: Disable User Browsing

Hi - just to say we are also wanting this type of functionality and want to control what our unregistered users can see,specifically the people profile info.

 

Chris

More Like This

  • Retrieving data ...

Bookmarked By (1)

To better serve our customers we have included functionality to automatically follow up on a case after it has been idle for more than 5 days, and then auto close after an additional 3 days of inactivity. Choose No to acknowledge that this case will remain idle for longer than 5 days.
Making cases public allows other customers to learn from the solution of the case. It can also be used to gain feedback from others in the community. Ask our Support Engineers for more info, but we encourage you to make your cases public.