Jacek Wiślicki wrote:
Wiadomosc od Sven Richter z 2005-09-07 00:05 brzmiala:
At the moment I'm using a logout portlet the user can reach by
clicking on a tab, which is then showing a page with the logout
portlet. Now I'm trying to find a way to implement an Action, where a
user can logout by simply clicking on the tab.
Is that even possible?
Normally its done thru a link:
<a href="$jslink.setAction($config.getString("action.logout"))"
$FontStyle>$l10n.TOP_LOGOUT</a>
but to get it to work in a tab is more challenging
I would try a redirect portlet with the URL set to:
http://localhost:8080/jetspeed/portal/media-type/html/user/admin/page/default.psml?action=JLogoutUser
although you may want to extend and create that at runtime
See the portlets.xreg:
<portlet-entry name="RedirectPortlet" hidden="false"
type="abstract" application="false">
<meta-info>
<title>Redirect Portlet</title>
<description>Redirects the portal to the configured URL
when associated with a Jetspeed menu.</description>
</meta-info>
<classname>org.apache.jetspeed.portal.portlets.RedirectPortlet</classname>
<parameter name="url"
value="http://localhost:8080/jetspeed/portal/media-type/html/user/admin/page/default.psml?action=JLogoutUser"
hidden="false" cachedOnName="true" cachedOnValue="true">
<meta-info>
<title>URL</title>
<description>Redirects a menu option to this
URL</description>
</meta-info>
</parameter>
Just don't put it on the first tab or it will log you out immediately!
Well, I'm trying to perform a similar task. A solution in my case is
rather simple, as 'logut' action is realized with redirecting to
something like 'http://localhost:8080/jetspeed/login/logout' (of course,
generate the URL dynamicaly, so that it points to your portal's
appropriate resource), which link can be placed anywhere, even in a tab
(by a decorator script).
The question was for 1.6, this is a 2.0 solution
By the way, I'm trying to title such a link as 'logout username' and
'not log-on' if none user is logged on. Is there any Jetspeed global
variable in Velocity storing a name (or other data) of a current user?
Or I should rather create it myself?
(this is off thread now, because im speaking of 2.0)
we don't store any user attributes in our tables
try getting it from the user attributes (which you will need to manage)
--
David Sean Taylor
Bluesunrise Software
[EMAIL PROTECTED]
[office] +01 707 773-4646
[mobile] +01 707 529 9194
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]