Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 85748 invoked from network); 22 Sep 2009 09:20:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Sep 2009 09:20:54 -0000 Received: (qmail 58691 invoked by uid 500); 22 Sep 2009 09:20:53 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 58613 invoked by uid 500); 22 Sep 2009 09:20:53 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 58604 invoked by uid 99); 22 Sep 2009 09:20:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Sep 2009 09:20:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Sep 2009 09:20:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 634C7238889C; Tue, 22 Sep 2009 09:20:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r817568 - in /geronimo/server/branches/2.2: framework/configs/server-security-config/src/main/resources/security/ framework/modules/geronimo-jmx-remoting/ framework/modules/geronimo-jmx-remoting/src/main/java/org/apache/geronimo/jmxremoting... Date: Tue, 22 Sep 2009 09:20:29 -0000 To: scm@geronimo.apache.org From: genspring@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090922092030.634C7238889C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: genspring Date: Tue Sep 22 09:20:27 2009 New Revision: 817568 URL: http://svn.apache.org/viewvc?rev=817568&view=rev Log: GERONIMO-4823 role-based administration capabilities Modified: geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/groups.properties geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/users.properties geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/pom.xml geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/src/main/java/org/apache/geronimo/jmxremoting/Authenticator.java geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/src/test/java/org/apache/geronimo/jmxremoting/AuthenticatorTest.java geronimo/server/branches/2.2/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/welcome/welcomeNormal.jsp geronimo/server/branches/2.2/plugins/console/console-jetty/src/main/plan/plan.xml geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/navigation.jsp geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/web.xml geronimo/server/branches/2.2/plugins/console/console-tomcat/src/main/plan/plan.xml geronimo/server/branches/2.2/plugins/monitoring/mconsole-jetty/src/main/plan/plan.xml (contents, props changed) geronimo/server/branches/2.2/plugins/monitoring/mconsole-tomcat/src/main/plan/plan.xml (contents, props changed) geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MRCConnector.java geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp (contents, props changed) geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringPage.jsp geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp (contents, props changed) geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/web.xml Modified: geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/groups.properties URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/groups.properties?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/groups.properties (original) +++ geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/groups.properties Tue Sep 22 09:20:27 2009 @@ -15,3 +15,4 @@ # limitations under the License. #===================================================================== admin=system +monitor=monitor Modified: geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/users.properties URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/users.properties?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/users.properties (original) +++ geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/users.properties Tue Sep 22 09:20:27 2009 @@ -15,3 +15,4 @@ # limitations under the License. #===================================================================== system=manager +monitor=password Modified: geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/pom.xml URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/pom.xml?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/pom.xml (original) +++ geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/pom.xml Tue Sep 22 09:20:27 2009 @@ -46,7 +46,13 @@ geronimo-system ${version} + + org.apache.geronimo.framework + geronimo-security + ${version} + + Modified: geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/src/main/java/org/apache/geronimo/jmxremoting/Authenticator.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/src/main/java/org/apache/geronimo/jmxremoting/Authenticator.java?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/src/main/java/org/apache/geronimo/jmxremoting/Authenticator.java (original) +++ geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/src/main/java/org/apache/geronimo/jmxremoting/Authenticator.java Tue Sep 22 09:20:27 2009 @@ -16,17 +16,20 @@ */ package org.apache.geronimo.jmxremoting; -import java.util.Map; import java.util.Collections; import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +import javax.management.Notification; +import javax.management.NotificationListener; import javax.management.remote.JMXAuthenticator; import javax.management.remote.JMXConnectionNotification; -import javax.management.NotificationListener; -import javax.management.Notification; import javax.security.auth.Subject; import javax.security.auth.login.LoginContext; import javax.security.auth.login.LoginException; +import org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal; /** * JMX Authenticator that checks the Credentials by logging in via JAAS. * @@ -67,6 +70,18 @@ LoginContext context = new LoginContext(configName, credentials); context.login(); threadContext.set(context); + Subject sub = context.getSubject(); + Set pricipalsGroup = sub.getPrincipals(GeronimoGroupPrincipal.class); + boolean isInAdminGroup = false; + for (GeronimoGroupPrincipal principal : pricipalsGroup) { + if (principal.getName().equals("admin")) { + isInAdminGroup = true; + break; + } + } + if(!isInAdminGroup){ + throw new LoginException("Only users in admin group are allowed"); + } return context.getSubject(); } catch (LoginException e) { // do not propogate cause - we don't know what information is may contain Modified: geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/src/test/java/org/apache/geronimo/jmxremoting/AuthenticatorTest.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/src/test/java/org/apache/geronimo/jmxremoting/AuthenticatorTest.java?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/src/test/java/org/apache/geronimo/jmxremoting/AuthenticatorTest.java (original) +++ geronimo/server/branches/2.2/framework/modules/geronimo-jmx-remoting/src/test/java/org/apache/geronimo/jmxremoting/AuthenticatorTest.java Tue Sep 22 09:20:27 2009 @@ -18,8 +18,10 @@ import java.security.Principal; import java.util.HashMap; +import java.util.HashSet; import java.util.Map; import java.util.Set; + import javax.security.auth.Subject; import javax.security.auth.callback.Callback; import javax.security.auth.callback.CallbackHandler; @@ -28,12 +30,14 @@ import javax.security.auth.callback.UnsupportedCallbackException; import javax.security.auth.login.AppConfigurationEntry; import javax.security.auth.login.Configuration; -import javax.security.auth.login.LoginException; import javax.security.auth.login.FailedLoginException; +import javax.security.auth.login.LoginException; import javax.security.auth.spi.LoginModule; import junit.framework.TestCase; +import org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal; + /** * * @@ -43,6 +47,9 @@ private static final String CONFIG_NAME = "testConfig"; private Configuration oldConfiguration; private Authenticator authenticator; + public void testMonitorGroupLogin() throws Exception { + testFailure("monitor", "monitor"); + } public void testLogin() { try { @@ -137,6 +144,16 @@ private CallbackHandler handler; private Map options; private String username; + private static Map> userGroupsMap = new HashMap>(); + static { + Set systemGroupsSet = new HashSet(); + systemGroupsSet.add("admin"); + systemGroupsSet.add("monitor"); + userGroupsMap.put("system", systemGroupsSet); + Set monitorGroupsSet = new HashSet(); + monitorGroupsSet.add("monitor"); + userGroupsMap.put("monitor", monitorGroupsSet); + } public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) { this.subject = subject; @@ -167,6 +184,10 @@ public boolean commit() throws LoginException { subject.getPrincipals().add(new MockPrincipal(username)); + for (String groupName : userGroupsMap.get(username)) { + subject.getPrincipals().add( + new GeronimoGroupPrincipal(groupName)); + } return true; } Modified: geronimo/server/branches/2.2/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/welcome/welcomeNormal.jsp URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/welcome/welcomeNormal.jsp?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/welcome/welcomeNormal.jsp (original) +++ geronimo/server/branches/2.2/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/welcome/welcomeNormal.jsp Tue Sep 22 09:20:27 2009 @@ -56,6 +56,7 @@ + <%if(request.isUserInRole("admin")){ %> @@ -73,6 +74,7 @@
+ <%} %>

Modified: geronimo/server/branches/2.2/plugins/console/console-jetty/src/main/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/console/console-jetty/src/main/plan/plan.xml?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/console/console-jetty/src/main/plan/plan.xml (original) +++ geronimo/server/branches/2.2/plugins/console/console-jetty/src/main/plan/plan.xml Tue Sep 22 09:20:27 2009 @@ -232,6 +232,9 @@ + + + Modified: geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/navigation.jsp URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/navigation.jsp?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/navigation.jsp (original) +++ geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/themes/navigation.jsp Tue Sep 22 09:20:27 2009 @@ -113,6 +113,8 @@ for(int i=0;i
@@ -127,6 +129,7 @@
<% + } ArrayList list = categories.get(catName); int list_len = list.size(); for(int k=0;k <% + } } } %> Modified: geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/web.xml?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/web.xml (original) +++ geronimo/server/branches/2.2/plugins/console/console-portal-driver/src/main/webapp/WEB-INF/web.xml Tue Sep 22 09:20:27 2009 @@ -269,12 +269,40 @@ admin + monitor CONFIDENTIAL + + + + console monitor + /portal + /portal/Welcome + /portal/Welcome/* + /portal/Server/Information + /portal/Server/Information/* + /portal/Server/Java System Info + /portal/Server/Java System Info/* + /portal/Server/Thread Pools + /portal/Server/Thread Pools/* + /portal/Server/Monitoring + /portal/Server/Monitoring/* + /forwards/* + /dwr/* + GET + POST + PUT + + + monitor + admin + + + console @@ -295,7 +323,6 @@ admin - FORM geronimo-admin @@ -308,6 +335,10 @@ admin + + + monitor + Modified: geronimo/server/branches/2.2/plugins/console/console-tomcat/src/main/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/console/console-tomcat/src/main/plan/plan.xml?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/console/console-tomcat/src/main/plan/plan.xml (original) +++ geronimo/server/branches/2.2/plugins/console/console-tomcat/src/main/plan/plan.xml Tue Sep 22 09:20:27 2009 @@ -233,6 +233,9 @@ + + + Modified: geronimo/server/branches/2.2/plugins/monitoring/mconsole-jetty/src/main/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/monitoring/mconsole-jetty/src/main/plan/plan.xml?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/monitoring/mconsole-jetty/src/main/plan/plan.xml (original) +++ geronimo/server/branches/2.2/plugins/monitoring/mconsole-jetty/src/main/plan/plan.xml Tue Sep 22 09:20:27 2009 @@ -47,5 +47,19 @@ PlutoPortalServices + + geronimo-admin + + + + + + + + + + + + Propchange: geronimo/server/branches/2.2/plugins/monitoring/mconsole-jetty/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: geronimo/server/branches/2.2/plugins/monitoring/mconsole-tomcat/src/main/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/monitoring/mconsole-tomcat/src/main/plan/plan.xml?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/monitoring/mconsole-tomcat/src/main/plan/plan.xml (original) +++ geronimo/server/branches/2.2/plugins/monitoring/mconsole-tomcat/src/main/plan/plan.xml Tue Sep 22 09:20:27 2009 @@ -47,5 +47,17 @@ PlutoPortalServices + geronimo-admin + + + + + + + + + + + Propchange: geronimo/server/branches/2.2/plugins/monitoring/mconsole-tomcat/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MRCConnector.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MRCConnector.java?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MRCConnector.java (original) +++ geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MRCConnector.java Tue Sep 22 09:20:27 2009 @@ -16,6 +16,9 @@ */ package org.apache.geronimo.monitoring.console; +import java.net.InetAddress; +import java.sql.Connection; +import java.sql.Statement; import java.io.IOException; import java.text.Format; import java.text.SimpleDateFormat; @@ -37,9 +40,11 @@ import javax.naming.Context; import javax.naming.InitialContext; +import org.apache.geronimo.console.util.PortletManager; import org.apache.geronimo.crypto.EncryptionManager; import org.apache.geronimo.monitoring.MasterRemoteControlRemote; import org.apache.geronimo.monitoring.console.data.Node; +import org.apache.geronimo.system.jmx.RealMBeanServerReference; public class MRCConnector { @@ -94,6 +99,12 @@ } else { try { + InetAddress host = InetAddress.getLocalHost();//maybe throw a UnknownHostException + if (ip.equals("localhost") || ip.equals(host.getHostAddress()) + || ip.equals(host.getHostName()) + ||ip.equals("127.0.0.1")) { + mbServerConn = ((RealMBeanServerReference)PortletManager.getKernel().getGBean("MBeanServerReference")).getMBeanServer(); + } else { JMXServiceURL serviceURL = new JMXServiceURL( "service:jmx:rmi:///jndi/rmi://" + ip + ":" + port + "/JMXConnector"); @@ -105,6 +116,7 @@ connector = JMXConnectorFactory.connect( serviceURL, env); mbServerConn = connector.getMBeanServerConnection(); + } // retrieve the mbean name to the agent-car-jmx plugin if(PATH == null) { Modified: geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp (original) +++ geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp Tue Sep 22 09:20:27 2009 @@ -72,8 +72,9 @@ "><%=graph.getNode().getName()%> <%=graph.getTimeFrame()%> <%=graph.getDataName1()%><%if (graph.getOperation() != null && !graph.getOperation().equals("null")){%><%=graph.getOperation()%><%}%><%if (graph.getDataName2() != null && !graph.getDataName2().equals("null")){%><%=graph.getDataName2()%><%}%> + <%if(request.isUserInRole("admin")){ %> ">Edit -<%} +<%} } else { %> @@ -81,14 +82,20 @@ <%=graph.getNode().getName()%> <%=graph.getTimeFrame()%> <%=graph.getDataName1()%><%if (graph.getOperation() != null && !graph.getOperation().equals("null")){%><%=graph.getOperation()%><%}%><%if (graph.getDataName2() != null && !graph.getDataName2().equals("null")){%><%=graph.getDataName2()%><%}%> + <%if(request.isUserInRole("admin")){ %> edit <% } }%> + <%} +%> + <%if(request.isUserInRole("admin")){ %> +<%} +%>       Propchange: geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp ------------------------------------------------------------------------------ svn:eol-style = native Modified: geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp (original) +++ geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp Tue Sep 22 09:20:27 2009 @@ -65,15 +65,19 @@ <%="" + view.getGraphs().size()%> <%--<%=rs.getString("added").substring(0,16)%>--%> <%--<%=rs.getString("modified").substring(0,16)%>--%> + <%if(request.isUserInRole("admin")){ %> ">Edit + <%} %> <% } // rs.close(); %> +<% if (request.isUserInRole("admin")) {%> : +<% }%> @@ -147,56 +151,63 @@ if (collecting == 0) { // not collecting statistics %> -<% +<%if (request.isUserInRole("admin")) { if(node.isEnabled()) { // enable the links %> -<% +<% } else { // do not provide links %> -<% +<% } %> -<% +<% } //end admin + } else if (collecting == -1) { // not collecting statistics %> - <% + <%if (request.isUserInRole("admin")) { if(node.isEnabled()) { // enable the links + %> - <% + <% } else { // do not provide links %> - <% + <% } %> <% + }//end admin } else { // collecting statistics if (node.isEnabled()) { %> + <% if (request.isUserInRole("admin")) {%> -<% +<% }//end admin } else { %> + <% if (request.isUserInRole("admin")) {%> - <% + <% } } } +if (request.isUserInRole("admin")) { if(node.isEnabled()) { // enabled server + %> <% @@ -205,12 +216,15 @@ <% } +}//end admin %> <%} %>
()">Enable QueryEnable Query">EditDisable QueryDisable Query">Edit<%=snapshotDuration/1000/60+" min. "%>()">Disable Query ">EditDisable Query ">Edit">Disable">Enable
+<%if (request.isUserInRole("admin")) {%> +<% } %> : @@ -245,8 +259,9 @@ + <%if(request.isUserInRole("admin")){ %> -<%} +<%} } else { %> @@ -254,11 +269,14 @@ + <%if(request.isUserInRole("admin")){ %> - <% + <% } %><% }%> <%} %>
"><%=graph.getNode().getName()%> <%=graph.getTimeFrame()%> <%=graph.getDataName1()%><%if (graph.getOperation() != null && !graph.getOperation().equals("null")){%><%=graph.getOperation()%><%}%><%if (graph.getDataName2() != null && !graph.getDataName2().equals("null")){%><%=graph.getDataName2()%><%}%>">Edit<%=graph.getNode().getName()%> <%=graph.getTimeFrame()%> <%=graph.getDataName1()%><%if (graph.getOperation() != null && !graph.getOperation().equals("null")){%><%=graph.getOperation()%><%}%><%if (graph.getDataName2() != null && !graph.getDataName2().equals("null")){%><%=graph.getDataName2()%><%}%>Edit
+<% if (request.isUserInRole("admin")) {%> +<%}%> Modified: geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringPage.jsp URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringPage.jsp?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringPage.jsp (original) +++ geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringPage.jsp Tue Sep 22 09:20:27 2009 @@ -124,6 +124,7 @@

+ <%if(request.isUserInRole("admin")){ %>
@@ -142,6 +143,7 @@
+ <%} %> Modified: geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp (original) +++ geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp Tue Sep 22 09:20:27 2009 @@ -106,68 +106,82 @@ () <% if(node.isEnabled()) { // enable the links + if(request.isUserInRole("admin")){ %> ">Enable Query -<% +<% }//end admin } else { // do not provide links + if(request.isUserInRole("admin")){ %> Enable Query -<% +<% }//end admin } +if(request.isUserInRole("admin")){ %> ">Edit -<% +<%}//end admin } else if (collecting == -1) { // not collecting statistics %> <% if(node.isEnabled()) { // enable the links + if(request.isUserInRole("admin")){ %> Disable Query - <% + <% }//end admin } else { // do not provide links + if(request.isUserInRole("admin")){ %> Enable Query - <% + <% }//end admin } + if(request.isUserInRole("admin")){ %> ">Edit - <% + <%}//end admin } else { // collecting statistics if (node.isEnabled()) { %> <%=snapshotDuration/1000/60+" min. (running)"%> + <%if(request.isUserInRole("admin")){ %> ">Disable Query ">Edit -<% +<%}//end admin + } else { %> + <%if(request.isUserInRole("admin")){ %> Disable Query ">Edit - <% + <% }//end admin } } if(node.isEnabled()) { // enabled server + if(request.isUserInRole("admin")){ %> ">Disable -<% +<%}//end admin } else { // disabled server + if(request.isUserInRole("admin")){ %> ">Enable -<% +<%}//end admin } %> <%} %> +<%if(request.isUserInRole("admin")){ %> +<%} +%>       Modified: geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp (original) +++ geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp Tue Sep 22 09:20:27 2009 @@ -194,8 +194,11 @@ { String dataName = itt.next().toString(); %> + <%if(request.isUserInRole("admin")){ %> "><%=dataName%><%=beanStats.get(dataName) %> - <% + <% }else{ %> + <%=dataName%><%=beanStats.get(dataName) %> + <%}//end request.isUserInRole } } else { %> @@ -254,6 +257,7 @@

+ <%if(request.isUserInRole("admin")){ %>
@@ -419,6 +423,7 @@ } %>
+ <% } //end admin%> Modified: geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp (original) +++ geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp Tue Sep 22 09:20:27 2009 @@ -58,14 +58,19 @@ <%=view.getGraphs().size()%> <%--<%=rs.getString("added").substring(0,16)%>--%> <%--<%=rs.getString("modified").substring(0,16)%>--%> + <%if(request.isUserInRole("admin")){ %> ">Edit +<%} %> <% } // rs.close(); %> +<%if(request.isUserInRole("admin")){ %> +<%} +%>       Propchange: geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp ------------------------------------------------------------------------------ svn:eol-style = native Modified: geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/web.xml?rev=817568&r1=817567&r2=817568&view=diff ============================================================================== --- geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/web.xml (original) +++ geronimo/server/branches/2.2/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/web.xml Tue Sep 22 09:20:27 2009 @@ -73,5 +73,11 @@ jpa/monitoring jpa/monitoring + + admin + + + monitor +