You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Net Dawg <ne...@yahoo.com> on 2013/10/23 03:54:21 UTC
Show Form Button Only to Logged in Users
Want to show form button only if the user is already logged in.
Using HTTP BASIC Authentication provided by Tomcat host
http://docs.oracle.com/cd/E11035_01/wls100/security/thin_client.html#wp1033295
Does Tapestry have out-of-box solution for this?
Re: Show Form Button Only to Logged in Users
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 22 Oct 2013 23:54:21 -0200, Net Dawg <ne...@yahoo.com> wrote:
> Want to show form button only if the user is already logged in.
> Using HTTP BASIC Authentication provided by Tomcat host
> http://docs.oracle.com/cd/E11035_01/wls100/security/thin_client.html#wp1033295
>
>
> Does Tapestry have out-of-box solution for this?
No, but it should be quite simple: @Inject HttpServletRequest and use its
getRemoteUser() to know whether the user is logged in or not, then the If
component to show or not the button.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org