Author: tyrell
Date: Fri Dec 7 04:53:36 2007
New Revision: 10697
Log:
Adding user and role based filtering to the Tasks Panel in the Mashup page.
Modified:
trunk/mashup/java/modules/www/org/mashup.jsp
Modified: trunk/mashup/java/modules/www/org/mashup.jsp
==============================================================================
--- trunk/mashup/java/modules/www/org/mashup.jsp (original)
+++ trunk/mashup/java/modules/www/org/mashup.jsp Fri Dec 7 04:53:36 2007
@@ -434,28 +434,33 @@
<tr>
<td>
<ul>
+ <!--Will be available only to users with Admin priviledges
and who are Authors of the current Mashup-->
+ <% if ((RegistryUtils.isAdminRole(registry)) &&
+
(author.equalsIgnoreCase(RegistryUtils.getCurrentUser(registry)))) { %>
<li>
- <a href="#">Start|Stop this service** ***</a>
+ <a href="#">Start|Stop this service</a>
</li>
<li>
- <a href="#">Edit this service** ***</a>
+ <a href="#">Edit this service</a>
</li>
+ <%}%>
<li>
- <a href="#">Create a new service*</a>
+ <a href="#">Create a new service</a>
</li>
<li>
- <a href="#">Share this service *</a>
+ <a href="#">Share this service</a>
</li>
+ <!--Will be available only to users with Admin priviledges
and who are Authors of the current Mashup-->
+ <% if ((RegistryUtils.isAdminRole(registry)) &&
+
(author.equalsIgnoreCase(RegistryUtils.getCurrentUser(registry)))) { %>
<li>
- <a href="#">Delete this service ** ***</a>
+ <a href="#">Delete this service</a>
</li>
+ <%}%>
</ul>
- <div>* only when logged in.</div>
- <div>** only when logged in as an admin.</div>
- <div>*** only viewing your own page.</div>
</td>
</tr>
- <%}else{%>
+ <%} else {%>
<tr>
<td><a href="signin.jsp?bounceback=<%=thisPage%>">Sign in</a> to
perform tasks</td>
</tr>
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev