cancel
Showing results for 
Search instead for 
Did you mean: 

Need to customize Web client UI, but only for Guest user

theorbix
Confirmed Champ
Confirmed Champ
Hello,

I need to customize the Web Client user interface, but only for guest users.

Basically, when someone connects to the Web Client as a guest user, I need to disable/hide some UI elements that should still remain accessible to "normal" users.

Here are the elements I'd like to remove from the UI:
- the User Options icon in the toolbar (it's useless for guest users)
- the "My home" link in the toolbar (my guest users are pure read only users that can only access and read documents in a set of shared Spaces, so the Guest Home folder would be useless and confusing for them)
- the "My home" link in the navigator pane on the left (for the same reason above)

Last change, I need to be sure that when someone connects to Alfresco as a Guest user, a certain UI language is automatically selected (currently it defaults to English, if I'm not wrong).

Can the Web Client be customized in this way?

Where should I start?
3 REPLIES 3

gavinc
Champ in-the-making
Champ in-the-making
There aren't out of the box configuration options for this I'm afraid, however, you should be able to do most of it.

You can use the rendered attribute on components defined in the JSP page or our boolean evaluator component to 'hide' stuff. If you look in browse.jsp you'll see the use of the following value binding expression:

#{NavigationBean.isGuest == false}

Search the other JSPs for other examples.

theorbix
Confirmed Champ
Confirmed Champ
Gavin,

Thanks for the hint. I started modifying the WebClient and some changes are actually very simple.

For instance, to disable - just for the guest user -  the "User options" icon in the toolbar, I only had to add the modifier option in the titlebar.jsp page:

<%– user preferences –%>
<a:actionLink value="#{msg.user_console}" rendered="#{!NavigationBean.isGuest}"
image="/images/icons/user_console.gif"
showLink="false"
action="dialog:userConsole"
actionListener="#{UsersBean.setupUserAction}"
id="alf_user_console">
<fSmiley Tonguearam name="id" value="#{NavigationBean.currentUser.person.id}" />
</a:actionLink>


Now I'll look at how to hide the links to the "My Home" space (again, only for the Guest user) from both the toolbar and the navigator pane. Hopefully it should not bee too difficult.

theorbix
Confirmed Champ
Confirmed Champ
Oh… by the way: I think this change should be included in the main code stream of the Web Client: when accessing to Alfresco in guest mode, there is no reason at all to show the User Options icon in the toolbar…