Return-Path: X-Original-To: apmail-manifoldcf-commits-archive@www.apache.org Delivered-To: apmail-manifoldcf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E5F2D18B1B for ; Wed, 8 Jul 2015 22:01:11 +0000 (UTC) Received: (qmail 64639 invoked by uid 500); 8 Jul 2015 22:01:11 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 64520 invoked by uid 500); 8 Jul 2015 22:01:11 -0000 Mailing-List: contact commits-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list commits@manifoldcf.apache.org Received: (qmail 64358 invoked by uid 99); 8 Jul 2015 22:01:11 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jul 2015 22:01:11 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 5DD2CAC0A50 for ; Wed, 8 Jul 2015 22:01:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1689968 [6/14] - in /manifoldcf/branches/CONNECTORS-1196: ./ connectors/elasticsearch/ connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/ connectors/solr/connector/src/main/native2ascii/org/apache/manifoldcf/... Date: Wed, 08 Jul 2015 22:01:09 -0000 To: commits@manifoldcf.apache.org From: kishore@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150708220111.5DD2CAC0A50@hades.apache.org> Modified: manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/edittransformation.jsp URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/edittransformation.jsp?rev=1689968&r1=1689967&r2=1689968&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/edittransformation.jsp (original) +++ manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/edittransformation.jsp Wed Jul 8 22:01:08 2015 @@ -23,16 +23,27 @@ %> <% - // The contract of this edit page is as follows. It is either called directly, in which case it is expected to be creating - // a connection or beginning the process of editing an existing connection, or it is called via redirection from execute.jsp, in which case - // the connection object being edited will be placed in the thread context under the name "ConnectionObject". - try - { +// The contract of this edit page is as follows. It is either called directly, in which case it is expected to be creating +// a connection or beginning the process of editing an existing connection, or it is called via redirection from execute.jsp, in which case +// the connection object being edited will be placed in the thread context under the name "ConnectionObject". +try +{ + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + { + variableContext.setParameter("target","listtransformations.jsp"); +%> + +<% + } + // Get the connection manager handle ITransformationConnectionManager connMgr = TransformationConnectionManagerFactory.make(threadContext); // Also get the list of available connectors ITransformationConnectorManager connectorManager = TransformationConnectorManagerFactory.make(threadContext); + IResultSet set = connectorManager.getConnectors(); + // Figure out what the current tab name is. String tabName = variableContext.getParameter("tabname"); if (tabName == null || tabName.length() == 0) @@ -101,115 +112,115 @@ @@ -221,76 +232,76 @@ - - - - + +
+ + + + + - -
<% // Get connector list; need this to decide what to do - IResultSet set = connectorManager.getConnectors(); if (set.getRowCount() == 0) { %> -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.EditTransformationConnection2")%>

-
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.NoTransformationConnectorsRegistered")%>
+

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.EditTransformationConnection2")%>

+
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.NoTransformationConnectorsRegistered")%>
<% } else { %> -
- - - - - - - - + +
+ + + + + + + + + - - - - - + + + + + + <% int tabNum = 0; while (tabNum < tabsArray.size()) { - String tab = (String)tabsArray.get(tabNum++); - if (tab.equals(tabName)) - { + String tab = (String)tabsArray.get(tabNum++); + if (tab.equals(tabName)) + { %> - + <% - } - else - { + } + else + { %> - + <% - } + } } %> - - - + + + +
<% if (description.length() > 0) { %> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.EditTransformationConnection")%> '<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%>' + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.EditTransformationConnection")%> '<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%>' <% } else { %> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.EditATransformationConnection")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.EditATransformationConnection")%> <% } %> -
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(tab)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(tab)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(tab)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(tab)%>
+
<% @@ -298,42 +309,45 @@ if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"edittransformation.Name"))) { %> - - - - + + + + + +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.NameColon")%> + + + + - - - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.NameColon")%> <% // If the connection doesn't exist yet, we are allowed to change the name. if (connection == null || connectionName.length() < 1) { %> - + <% } else { %> - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectionName)%> - + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectionName)%> + <% } %> -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.DescriptionColon")%> - -
+
+ <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.DescriptionColon")%> + + +
<% } else { - // Hiddens for the Name tab + // Hiddens for the Name tab %> - - + + <% } @@ -342,61 +356,62 @@ if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"edittransformation.Type"))) { %> - - - - + +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.ConnectionTypeColon")%> + + + + - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.ConnectionTypeColon")%> <% if (className.length() > 0) { - String value = connectorManager.getDescription(className); - if (value == null) - { + String value = connectorManager.getDescription(className); + if (value == null) + { %> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.UNREGISTERED")%> <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(className)%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.UNREGISTERED")%> <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(className)%> <% - } - else - { + } + else + { %> - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(value)%> + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(value)%> <% - } + } %> - + <% } else { - int i = 0; + int i = 0; %> - <% - while (i < set.getRowCount()) - { - IResultRow row = set.getRow(i++); - String thisClassName = row.getValue("classname").toString(); - String thisDescription = row.getValue("description").toString(); + while (i < set.getRowCount()) + { + IResultRow row = set.getRow(i++); + String thisClassName = row.getValue("classname").toString(); + String thisDescription = row.getValue("description").toString(); %> - + <% - } + } %> - + <% } %> -
+
<% } else { - // Hiddens for the "Type" tab + // Hiddens for the "Type" tab %> - + <% } @@ -405,77 +420,81 @@ if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"edittransformation.Throttling"))) { %> - - - - - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.MaxConnectionsColon")%>
+ + + + + + +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"edittransformation.MaxConnectionsColon")%>
<% } else { - // Hiddens for "Throttling" tab + // Hiddens for "Throttling" tab %> - + <% } if (className.length() > 0) - TransformationConnectorFactory.outputConfigurationBody(threadContext,className,new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),parameters,tabName); + TransformationConnectorFactory.outputConfigurationBody(threadContext,className,new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),parameters,tabName); %> - - - - -

+ + + + - -

+ <% if (className.length() > 0) { %> - " onClick="javascript:Save()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"edittransformation.SaveThisTransformationConnection")%>"/> + " onClick="javascript:Save()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"edittransformation.SaveThisTransformationConnection")%>"/> <% } else { - if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"edittransformation.Type"))) - { + if (tabName.equals(Messages.getString(pageContext.getRequest().getLocale(),"edittransformation.Type"))) + { %> - " onClick="javascript:Continue()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"edittransformation.ContinueToNextPage")%>"/> + " onClick="javascript:Continue()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"edittransformation.ContinueToNextPage")%>"/> <% - } + } } %> -  " onClick="javascript:Cancel()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"edittransformation.CancelTransformationConnectionEditing")%>"/>
-
- + " onClick="javascript:Cancel()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"edittransformation.CancelTransformationConnectionEditing")%>"/> + +
+
+ <% } %> -
+
<% - } - catch (ManifoldCFException e) - { +} +catch (ManifoldCFException e) +{ e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); variableContext.setParameter("target","listtransformations.jsp"); %> <% - } +} %> Modified: manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/execute.jsp URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/execute.jsp?rev=1689968&r1=1689967&r2=1689968&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/execute.jsp (original) +++ manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/execute.jsp Wed Jul 8 22:01:08 2015 @@ -165,6 +165,14 @@ } else if (op.equals("Save")) { + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + { + variableContext.setParameter("target","listconnections.jsp"); +%> + +<% + } connManager.save(connection); variableContext.setParameter("connname",connectionName); %> @@ -280,11 +288,20 @@ { threadContext.save("GroupObject",group); %> - + <% } else if (op.equals("Save")) { + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + { + variableContext.setParameter("target","listgroups.jsp"); +%> + +<% + } + authGroupManager.save(group); variableContext.setParameter("groupname",groupName); %> @@ -415,6 +432,15 @@ } else if (op.equals("Save")) { + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + { + variableContext.setParameter("target","listauthorities.jsp"); +%> + +<% + } + authConnManager.save(connection); variableContext.setParameter("connname",connectionName); %> @@ -538,6 +564,15 @@ } else if (op.equals("Save")) { + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + { + variableContext.setParameter("target","listmappers.jsp"); +%> + +<% + } + mappingConnManager.save(connection); variableContext.setParameter("connname",connectionName); %> @@ -653,6 +688,15 @@ } else if (op.equals("Save")) { + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + { + variableContext.setParameter("target","listoutputs.jsp"); +%> + +<% + } + outputManager.save(connection); variableContext.setParameter("connname",connectionName); %> @@ -812,6 +856,15 @@ } else if (op.equals("Save")) { + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + { + variableContext.setParameter("target","listtransformations.jsp"); +%> + +<% + } + transformationManager.save(connection); variableContext.setParameter("connname",connectionName); %> @@ -927,6 +980,15 @@ } else if (op.equals("Save")) { + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + { + variableContext.setParameter("target","listnotifications.jsp"); +%> + +<% + } + notificationManager.save(connection); variableContext.setParameter("connname",connectionName); %> @@ -1470,6 +1532,15 @@ } else if (op.equals("Save")) { + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_EDIT_JOBS)) + { + variableContext.setParameter("target","listjobs.jsp"); +%> + +<% + } + manager.save(job); // Reset the job schedule. We may want to make this explicit at some point; having // this happen all the time seems wrong. Modified: manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listauthorities.jsp URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listauthorities.jsp?rev=1689968&r1=1689967&r2=1689968&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listauthorities.jsp (original) +++ manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listauthorities.jsp Wed Jul 8 22:01:08 2015 @@ -22,6 +22,23 @@ */ %> +<% +try +{ + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + { + variableContext.setParameter("target","index.jsp"); +%> + +<% + } + // Get the authority connection manager handle + IAuthorityConnectionManager manager = AuthorityConnectionManagerFactory.make(threadContext); + IAuthorityConnectorManager connectorManager = AuthorityConnectorManagerFactory.make(threadContext); + IAuthorityConnection[] connections = manager.getAllConnections(); +%> + @@ -38,49 +55,42 @@ + - - - - - -
-

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.ListOfAuthorityConnections")%>

-
- - - - -<% - try - { - // Get the authority connection manager handle - IAuthorityConnectionManager manager = AuthorityConnectionManagerFactory.make(threadContext); - IAuthorityConnectorManager connectorManager = AuthorityConnectorManagerFactory.make(threadContext); - IAuthorityConnection[] connections = manager.getAllConnections(); -%> - - - - - - - - +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.Description")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.AuthorityType")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.Max")%>
+ + + + + + +
+

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.ListOfAuthorityConnections")%>

+ + + + + + + + + + + + + + <% int i = 0; while (i < connections.length) @@ -98,44 +108,44 @@ connectorName = className + "(uninstalled)"; %> - > - - - - - - + > + + + + + + <% } %> - - - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.Description")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.AuthorityType")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.Max")%>
- - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.View")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.Edit")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.Delete")%> - - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%><%=Integer.toString(maxCount)%>
+ + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.View")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.Edit")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.Delete")%> + + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%><%=Integer.toString(maxCount)%>

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.AddaNewConnection")%>
+

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listauthorities.AddaNewConnection")%>
<% - } - catch (ManifoldCFException e) - { +} +catch (ManifoldCFException e) +{ e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); variableContext.setParameter("target","index.jsp"); %> <% - } +} %> - -
+ + + + Modified: manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listconnections.jsp URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listconnections.jsp?rev=1689968&r1=1689967&r2=1689968&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listconnections.jsp (original) +++ manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listconnections.jsp Wed Jul 8 22:01:08 2015 @@ -22,6 +22,23 @@ */ %> +<% +try +{ + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + { + variableContext.setParameter("target","index.jsp"); +%> + +<% + } + // Get the job manager handle + IRepositoryConnectionManager manager = RepositoryConnectionManagerFactory.make(threadContext); + IConnectorManager connectorManager = ConnectorManagerFactory.make(threadContext); + IRepositoryConnection[] connections = manager.getAllConnections(); +%> + @@ -37,15 +54,15 @@ @@ -54,36 +71,29 @@ - - - - - -
-

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.ListOfRepositoryConnections")%>

-
- - - - -<% - try - { - // Get the job manager handle - IRepositoryConnectionManager manager = RepositoryConnectionManagerFactory.make(threadContext); - IConnectorManager connectorManager = ConnectorManagerFactory.make(threadContext); - IRepositoryConnection[] connections = manager.getAllConnections(); -%> - - - - - - - - - - - - +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.Description")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.ConnectionType")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.AuthorityGroup")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.Max")%>
+ + + + + + + +
+

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.ListOfRepositoryConnections")%>

+ + + + + + + + + + + + + + + + + <% int i = 0; while (i < connections.length) @@ -102,50 +112,47 @@ int maxCount = connection.getMaxConnections(); %> - > - - - - - - - + > + + + + + + + <% } %> - - - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.Description")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.ConnectionType")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.AuthorityGroup")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.Max")%>
- - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.View")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.Edit")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.Delete")%> - - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%><%=((authorityName==null)?Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.GlobalAuthority"):org.apache.manifoldcf.ui.util.Encoder.bodyEscape(authorityName))%><%=Integer.toString(maxCount)%>
+ + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.View")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.Edit")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.Delete")%> + + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%><%=((authorityName==null)?Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.GlobalAuthority"):org.apache.manifoldcf.ui.util.Encoder.bodyEscape(authorityName))%><%=Integer.toString(maxCount)%>

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.AddNewConnection")%>
+

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listconnections.AddNewConnection")%>
<% - } - catch (ManifoldCFException e) - { +} +catch (ManifoldCFException e) +{ e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); variableContext.setParameter("target","index.jsp"); %> <% - } +} %> - -
+ + + + -<% - -%> Modified: manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listgroups.jsp URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listgroups.jsp?rev=1689968&r1=1689967&r2=1689968&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listgroups.jsp (original) +++ manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listgroups.jsp Wed Jul 8 22:01:08 2015 @@ -22,6 +22,22 @@ */ %> +<% +try +{ + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + { + variableContext.setParameter("target","index.jsp"); +%> + +<% + } + // Get the authority group manager handle + IAuthorityGroupManager manager = AuthorityGroupManagerFactory.make(threadContext); + IAuthorityGroup[] groups = manager.getAllGroups(); +%> + @@ -38,15 +54,15 @@ @@ -55,32 +71,25 @@ - - - - - -
-

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listgroups.ListOfAuthorityGroups")%>

-
- - - - -<% - try - { - // Get the authority group manager handle - IAuthorityGroupManager manager = AuthorityGroupManagerFactory.make(threadContext); - IAuthorityGroup[] groups = manager.getAllGroups(); -%> - - - - - - - - - +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listgroups.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listgroups.Description")%>
+ + + + + + +
+

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listgroups.ListOfAuthorityGroups")%>

+ + + + + + + + + + + + + + <% int i = 0; while (i < groups.length) @@ -93,42 +102,42 @@ description = ""; %> - > - - - - + > + + + + <% } %> - - - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listgroups.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listgroups.Description")%>
- - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listgroups.View")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listgroups.Edit")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listgroups.Delete")%> - - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%>
+ + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listgroups.View")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listgroups.Edit")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listgroups.Delete")%> + + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%>

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listgroups.AddaNewGroup")%>
+

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listgroups.AddaNewGroup")%>
<% - } - catch (ManifoldCFException e) - { +} + catch (ManifoldCFException e) +{ e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); variableContext.setParameter("target","index.jsp"); %> <% - } +} %> - -
+ + + + Modified: manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listjobs.jsp URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listjobs.jsp?rev=1689968&r1=1689967&r2=1689968&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listjobs.jsp (original) +++ manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listjobs.jsp Wed Jul 8 22:01:08 2015 @@ -22,6 +22,22 @@ */ %> +<% +try +{ + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_VIEW_JOBS)) + { + variableContext.setParameter("target","index.jsp"); +%> + +<% + } + // Get the job manager handle + IJobManager manager = JobManagerFactory.make(threadContext); + IJobDescription[] jobs = manager.getAllJobs(); +%> + @@ -37,15 +53,15 @@ @@ -55,34 +71,28 @@ - - - - - -
-

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.JobList")%>

-
- - - - -<% - try - { - // Get the job manager handle - IJobManager manager = JobManagerFactory.make(threadContext); - IJobDescription[] jobs = manager.getAllJobs(); -%> - - - - - - - - - - - +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.OutputConnection")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.RepositoryConnection")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.ScheduleType")%>
+ + + + + + + +
+

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.JobList")%>

+ + + + + + + + + + + + + + + + <% for (int i = 0; i < jobs.length; i++) { @@ -113,45 +123,45 @@ } %> - > - - - - - - + > + + + + + + <% } %> - - - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.OutputConnection")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.RepositoryConnection")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.ScheduleType")%>
- - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.View")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.Edit")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.Delete")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.Copy")%> - - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(jd.getDescription())%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(outputConnectionNames)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(jd.getConnectionName())%><%=jobType%>
+ + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.View")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.Edit")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.Delete")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.Copy")%> + + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(jd.getDescription())%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(outputConnectionNames)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(jd.getConnectionName())%><%=jobType%>

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.AddaNewJob")%>
+

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listjobs.AddaNewJob")%>
<% - } - catch (ManifoldCFException e) - { +} +catch (ManifoldCFException e) +{ e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); variableContext.setParameter("target","index.jsp"); %> <% - } +} %> - -
+ + + + Modified: manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listmappers.jsp URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listmappers.jsp?rev=1689968&r1=1689967&r2=1689968&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listmappers.jsp (original) +++ manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listmappers.jsp Wed Jul 8 22:01:08 2015 @@ -22,6 +22,23 @@ */ %> +<% +try +{ + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + { + variableContext.setParameter("target","index.jsp"); +%> + +<% + } + // Get the mapping connection manager handle + IMappingConnectionManager manager = MappingConnectionManagerFactory.make(threadContext); + IMappingConnectorManager connectorManager = MappingConnectorManagerFactory.make(threadContext); + IMappingConnection[] connections = manager.getAllConnections(); +%> + @@ -38,15 +55,15 @@ @@ -55,35 +72,28 @@ - - - - - -
-

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.ListOfMappingConnections")%>

-
- - - - -<% - try - { - // Get the mapping connection manager handle - IMappingConnectionManager manager = MappingConnectionManagerFactory.make(threadContext); - IMappingConnectorManager connectorManager = MappingConnectorManagerFactory.make(threadContext); - IMappingConnection[] connections = manager.getAllConnections(); -%> - - - - - - - - - - - +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.Description")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.MapperType")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.Max")%>
+ + + + + + + +
+

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.ListOfMappingConnections")%>

+ + + + + + + + + + + + + + + + <% int i = 0; while (i < connections.length) @@ -101,45 +111,44 @@ connectorName = className + Messages.getString(pageContext.getRequest().getLocale(),"listmappers.uninstalled"); %> - > - - - - - - + > + + + + + + <% } %> - - - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.Description")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.MapperType")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.Max")%>
- - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.View")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.Edit")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.Delete")%> - - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%><%=Integer.toString(maxCount)%>
+ + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.View")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.Edit")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.Delete")%> + + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%><%=Integer.toString(maxCount)%>

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.AddaNewConnection")%>
+

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listmappers.AddaNewConnection")%>
<% - } - catch (ManifoldCFException e) - { +} +catch (ManifoldCFException e) +{ e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); variableContext.setParameter("target","index.jsp"); %> <% - } +} %> - -
- + + + + Modified: manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listnotifications.jsp URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listnotifications.jsp?rev=1689968&r1=1689967&r2=1689968&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listnotifications.jsp (original) +++ manifoldcf/branches/CONNECTORS-1196/framework/crawler-ui/src/main/webapp/listnotifications.jsp Wed Jul 8 22:01:08 2015 @@ -22,6 +22,23 @@ */ %> +<% +try +{ + // Check if authorized + if (!adminprofile.checkAllowed(threadContext,IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + { + variableContext.setParameter("target","index.jsp"); +%> + +<% + } + // Get the notification connection manager handle + INotificationConnectionManager manager = NotificationConnectionManagerFactory.make(threadContext); + INotificationConnectorManager connectorManager = NotificationConnectorManagerFactory.make(threadContext); + INotificationConnection[] connections = manager.getAllConnections(); +%> + @@ -37,15 +54,15 @@ @@ -54,35 +71,28 @@ - - - - - -
-

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.ListOfNotificationConnections")%>

-
- - - - -<% - try - { - // Get the notification connection manager handle - INotificationConnectionManager manager = NotificationConnectionManagerFactory.make(threadContext); - INotificationConnectorManager connectorManager = NotificationConnectorManagerFactory.make(threadContext); - INotificationConnection[] connections = manager.getAllConnections(); -%> - - - - - - - - - - - +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.Description")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.ConnectionType")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.Max")%>
+ + + + + + + +
+

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.ListOfNotificationConnections")%>

+ + + + + + + + + + + + + + + + <% int i = 0; while (i < connections.length) @@ -100,44 +110,44 @@ int maxCount = connection.getMaxConnections(); %> - > - - - - - - + > + + + + + + <% } %> - - - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.Name")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.Description")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.ConnectionType")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.Max")%>
- - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.View")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.Edit")%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.Delete")%> - - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%><%=Integer.toString(maxCount)%>
+ + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.View")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.Edit")%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.Delete")%> + + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(name)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%><%=Integer.toString(maxCount)%>

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.AddaNewNotificationConnection")%>
+

"><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"listnotifications.AddaNewNotificationConnection")%>
<% - } - catch (ManifoldCFException e) - { +} +catch (ManifoldCFException e) +{ e.printStackTrace(); variableContext.setParameter("text",e.getMessage()); variableContext.setParameter("target","index.jsp"); %> <% - } +} %> - -
+ + + +