Author: tyrell
Date: Tue Jan 22 03:26:54 2008
New Revision: 12675
Log:
Removing passing the current user as a parameter and getting it from the
registry.
Modified:
trunk/mashup/java/modules/www/mashup.jsp
trunk/mashup/java/modules/www/taskbar.jsp
Modified: trunk/mashup/java/modules/www/mashup.jsp
==============================================================================
--- trunk/mashup/java/modules/www/mashup.jsp (original)
+++ trunk/mashup/java/modules/www/mashup.jsp Tue Jan 22 03:26:54 2008
@@ -242,8 +242,7 @@
<%@ include file="searchbox.jsp" %>
<div id="taskbar">
- <jsp:include page="taskbar.jsp">
- <jsp:param name="currentUser" value="<%=currentUser%>"/>
+ <jsp:include page="taskbar.jsp">
<jsp:param name="mashupServiceName" value="<%=mashupServiceName%>"/>
<jsp:param name="path" value="<%=path%>"/>
<jsp:param name="thisPage" value="<%=thisPage%>"/>
Modified: trunk/mashup/java/modules/www/taskbar.jsp
==============================================================================
--- trunk/mashup/java/modules/www/taskbar.jsp (original)
+++ trunk/mashup/java/modules/www/taskbar.jsp Tue Jan 22 03:26:54 2008
@@ -42,7 +42,6 @@
<%
ResourceBundle bundle = ResourceBundle.getBundle("UI");
//Setting variables required for the taskbar.jsp
- String paramCurrentUser = request.getParameter("currentUser");
String paramMashupServiceName = request.getParameter("mashupServiceName");
String paramPath = request.getParameter("path");
@@ -53,6 +52,9 @@
Registry registry = RegistryUtils.getRegistry(request);
+ //Getting the currently logged in user
+ String currentUser = RegistryUtils.getCurrentUser(registry);
+
//Getting the mashup author
String author = null;
if (paramPath != null) {
@@ -73,7 +75,7 @@
<ul>
<!--Will be available only to users with Admin priviledges OR who are Authors
of the current Mashup, if there is a Mashup service set by the parent page.-->
<% if (((RegistryUtils.isAdminRole(registry)) ||
- (author != null && author.equalsIgnoreCase(paramCurrentUser))) &&
+ (author != null && author.equalsIgnoreCase(currentUser))) &&
(paramMashupServiceName != null)) { %>
<li id="service-status">
Service status not available
@@ -221,7 +223,7 @@
%>
<li>
- <a href="#"
onclick="WSO2.MashupUtils.showCreateMashupDialog('<%=paramCurrentUser%>');">Create
a
+ <a href="#"
onclick="WSO2.MashupUtils.showCreateMashupDialog('<%=currentUser%>');">Create a
new service</a>
</li>
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev