Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java?rev=1689231&r1=1689230&r2=1689231&view=diff ============================================================================== --- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java (original) +++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java Sun Jul 5 10:17:59 2015 @@ -1376,11 +1376,15 @@ public class ManifoldCF extends org.apac // Read result codes public static final int READRESULT_NOTFOUND = 0; public static final int READRESULT_FOUND = 1; - + public static final int READRESULT_NOTALLOWED = 2; + /** Read jobs */ - protected static int apiReadJobs(IThreadContext tc, Configuration output) + protected static int apiReadJobs(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_JOBS)) + return READRESULT_NOTALLOWED; + try { IJobManager jobManager = JobManagerFactory.make(tc); @@ -1401,9 +1405,12 @@ public class ManifoldCF extends org.apac } /** Read a job */ - protected static int apiReadJob(IThreadContext tc, Configuration output, Long jobID) + protected static int apiReadJob(IThreadContext tc, Configuration output, Long jobID, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_JOBS)) + return READRESULT_NOTALLOWED; + try { IJobManager jobManager = JobManagerFactory.make(tc); @@ -1429,9 +1436,12 @@ public class ManifoldCF extends org.apac } /** Read an output connection status */ - protected static int apiReadOutputConnectionStatus(IThreadContext tc, Configuration output, String connectionName) + protected static int apiReadOutputConnectionStatus(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IOutputConnectorPool outputConnectorPool = OutputConnectorPoolFactory.make(tc); @@ -1471,9 +1481,12 @@ public class ManifoldCF extends org.apac } /** Read a transformation connection status */ - protected static int apiReadTransformationConnectionStatus(IThreadContext tc, Configuration output, String connectionName) + protected static int apiReadTransformationConnectionStatus(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { ITransformationConnectorPool transformationConnectorPool = TransformationConnectorPoolFactory.make(tc); @@ -1513,9 +1526,12 @@ public class ManifoldCF extends org.apac } /** Read an authority connection status */ - protected static int apiReadAuthorityConnectionStatus(IThreadContext tc, Configuration output, String connectionName) + protected static int apiReadAuthorityConnectionStatus(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IAuthorityConnectorPool authorityConnectorPool = AuthorityConnectorPoolFactory.make(tc); @@ -1555,9 +1571,12 @@ public class ManifoldCF extends org.apac } /** Read a mapping connection status */ - protected static int apiReadMappingConnectionStatus(IThreadContext tc, Configuration output, String connectionName) + protected static int apiReadMappingConnectionStatus(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IMappingConnectorPool mappingConnectorPool = MappingConnectorPoolFactory.make(tc); @@ -1597,9 +1616,12 @@ public class ManifoldCF extends org.apac } /** Read a repository connection status */ - protected static int apiReadRepositoryConnectionStatus(IThreadContext tc, Configuration output, String connectionName) + protected static int apiReadRepositoryConnectionStatus(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IRepositoryConnectorPool repositoryConnectorPool = RepositoryConnectorPoolFactory.make(tc); @@ -1639,9 +1661,12 @@ public class ManifoldCF extends org.apac } /** Read a notification connection status */ - protected static int apiReadNotificationConnectionStatus(IThreadContext tc, Configuration output, String connectionName) + protected static int apiReadNotificationConnectionStatus(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { INotificationConnectorPool notificationConnectorPool = NotificationConnectorPoolFactory.make(tc); @@ -1681,9 +1706,12 @@ public class ManifoldCF extends org.apac } /** Read an output connection's info */ - protected static int apiReadOutputConnectionInfo(IThreadContext tc, Configuration output, String connectionName, String command) + protected static int apiReadOutputConnectionInfo(IThreadContext tc, Configuration output, String connectionName, String command, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IOutputConnectorPool outputConnectorPool = OutputConnectorPoolFactory.make(tc); @@ -1714,9 +1742,12 @@ public class ManifoldCF extends org.apac } /** Read a transformation connection's info */ - protected static int apiReadTransformationConnectionInfo(IThreadContext tc, Configuration output, String connectionName, String command) + protected static int apiReadTransformationConnectionInfo(IThreadContext tc, Configuration output, String connectionName, String command, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { ITransformationConnectorPool transformationConnectorPool = TransformationConnectorPoolFactory.make(tc); @@ -1747,9 +1778,12 @@ public class ManifoldCF extends org.apac } /** Read a repository connection's info */ - protected static int apiReadRepositoryConnectionInfo(IThreadContext tc, Configuration output, String connectionName, String command) + protected static int apiReadRepositoryConnectionInfo(IThreadContext tc, Configuration output, String connectionName, String command, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IRepositoryConnectorPool repositoryConnectorPool = RepositoryConnectorPoolFactory.make(tc); @@ -1780,9 +1814,12 @@ public class ManifoldCF extends org.apac } /** Read a notification connection's info */ - protected static int apiReadNotificationConnectionInfo(IThreadContext tc, Configuration output, String connectionName, String command) + protected static int apiReadNotificationConnectionInfo(IThreadContext tc, Configuration output, String connectionName, String command, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { INotificationConnectorPool notificationConnectorPool = NotificationConnectorPoolFactory.make(tc); @@ -1813,9 +1850,12 @@ public class ManifoldCF extends org.apac } /** Get api job statuses */ - protected static int apiReadJobStatuses(IThreadContext tc, Configuration output, Map<String,List<String>> queryParameters) + protected static int apiReadJobStatuses(IThreadContext tc, Configuration output, Map<String,List<String>> queryParameters, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_REPORTS)) + return READRESULT_NOTALLOWED; + if (queryParameters == null) queryParameters = new HashMap<String,List<String>>(); int maxCount; @@ -1847,9 +1887,12 @@ public class ManifoldCF extends org.apac } /** Get api job statuses */ - protected static int apiReadJobStatusesNoCounts(IThreadContext tc, Configuration output) + protected static int apiReadJobStatusesNoCounts(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_REPORTS)) + return READRESULT_NOTALLOWED; + try { IJobManager jobManager = JobManagerFactory.make(tc); @@ -1870,9 +1913,12 @@ public class ManifoldCF extends org.apac } /** Get api job status */ - protected static int apiReadJobStatus(IThreadContext tc, Configuration output, Long jobID, Map<String,List<String>> queryParameters) + protected static int apiReadJobStatus(IThreadContext tc, Configuration output, Long jobID, Map<String,List<String>> queryParameters, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_REPORTS)) + return READRESULT_NOTALLOWED; + if (queryParameters == null) queryParameters = new HashMap<String,List<String>>(); int maxCount; @@ -1903,9 +1949,12 @@ public class ManifoldCF extends org.apac } /** Get api job status with no counts */ - protected static int apiReadJobStatusNoCounts(IThreadContext tc, Configuration output, Long jobID) + protected static int apiReadJobStatusNoCounts(IThreadContext tc, Configuration output, Long jobID, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_REPORTS)) + return READRESULT_NOTALLOWED; + try { IJobManager jobManager = JobManagerFactory.make(tc); @@ -1925,9 +1974,12 @@ public class ManifoldCF extends org.apac } /** Get authority groups */ - protected static int apiReadAuthorityGroups(IThreadContext tc, Configuration output) + protected static int apiReadAuthorityGroups(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IAuthorityGroupManager groupManager = AuthorityGroupManagerFactory.make(tc); @@ -1948,9 +2000,12 @@ public class ManifoldCF extends org.apac } /** Read authority group */ - protected static int apiReadAuthorityGroup(IThreadContext tc, Configuration output, String groupName) + protected static int apiReadAuthorityGroup(IThreadContext tc, Configuration output, String groupName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IAuthorityGroupManager groupManager = AuthorityGroupManagerFactory.make(tc); @@ -1976,9 +2031,12 @@ public class ManifoldCF extends org.apac } /** Get output connections */ - protected static int apiReadOutputConnections(IThreadContext tc, Configuration output) + protected static int apiReadOutputConnections(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IOutputConnectionManager connManager = OutputConnectionManagerFactory.make(tc); @@ -1999,9 +2057,12 @@ public class ManifoldCF extends org.apac } /** Read output connection */ - protected static int apiReadOutputConnection(IThreadContext tc, Configuration output, String connectionName) + protected static int apiReadOutputConnection(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IOutputConnectionManager connectionManager = OutputConnectionManagerFactory.make(tc); @@ -2027,9 +2088,12 @@ public class ManifoldCF extends org.apac } /** Get transformation connections */ - protected static int apiReadTransformationConnections(IThreadContext tc, Configuration output) + protected static int apiReadTransformationConnections(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { ITransformationConnectionManager connManager = TransformationConnectionManagerFactory.make(tc); @@ -2050,9 +2114,12 @@ public class ManifoldCF extends org.apac } /** Read transformation connection */ - protected static int apiReadTransformationConnection(IThreadContext tc, Configuration output, String connectionName) + protected static int apiReadTransformationConnection(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { ITransformationConnectionManager connectionManager = TransformationConnectionManagerFactory.make(tc); @@ -2078,9 +2145,12 @@ public class ManifoldCF extends org.apac } /** Get authority connections */ - protected static int apiReadAuthorityConnections(IThreadContext tc, Configuration output) + protected static int apiReadAuthorityConnections(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IAuthorityConnectionManager connManager = AuthorityConnectionManagerFactory.make(tc); @@ -2101,9 +2171,12 @@ public class ManifoldCF extends org.apac } /** Get mapping connections */ - protected static int apiReadMappingConnections(IThreadContext tc, Configuration output) + protected static int apiReadMappingConnections(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IMappingConnectionManager connManager = MappingConnectionManagerFactory.make(tc); @@ -2124,9 +2197,12 @@ public class ManifoldCF extends org.apac } /** Read authority connection */ - protected static int apiReadAuthorityConnection(IThreadContext tc, Configuration output, String connectionName) + protected static int apiReadAuthorityConnection(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IAuthorityConnectionManager connectionManager = AuthorityConnectionManagerFactory.make(tc); @@ -2152,9 +2228,12 @@ public class ManifoldCF extends org.apac } /** Read mapping connection */ - protected static int apiReadMappingConnection(IThreadContext tc, Configuration output, String connectionName) + protected static int apiReadMappingConnection(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IMappingConnectionManager connectionManager = MappingConnectionManagerFactory.make(tc); @@ -2180,9 +2259,12 @@ public class ManifoldCF extends org.apac } /** Get repository connections */ - protected static int apiReadRepositoryConnections(IThreadContext tc, Configuration output) + protected static int apiReadRepositoryConnections(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IRepositoryConnectionManager connManager = RepositoryConnectionManagerFactory.make(tc); @@ -2203,9 +2285,12 @@ public class ManifoldCF extends org.apac } /** Read repository connection */ - protected static int apiReadRepositoryConnection(IThreadContext tc, Configuration output, String connectionName) + protected static int apiReadRepositoryConnection(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IRepositoryConnectionManager connectionManager = RepositoryConnectionManagerFactory.make(tc); @@ -2231,9 +2316,12 @@ public class ManifoldCF extends org.apac } /** Get notification connections */ - protected static int apiReadNotificationConnections(IThreadContext tc, Configuration output) + protected static int apiReadNotificationConnections(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { INotificationConnectionManager connManager = NotificationConnectionManagerFactory.make(tc); @@ -2254,9 +2342,12 @@ public class ManifoldCF extends org.apac } /** Read notification connection */ - protected static int apiReadNotificationConnection(IThreadContext tc, Configuration output, String connectionName) + protected static int apiReadNotificationConnection(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { INotificationConnectionManager connectionManager = NotificationConnectionManagerFactory.make(tc); @@ -2282,9 +2373,12 @@ public class ManifoldCF extends org.apac } /** List output connectors */ - protected static int apiReadOutputConnectors(IThreadContext tc, Configuration output) + protected static int apiReadOutputConnectors(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + // List registered output connectors try { @@ -2319,9 +2413,12 @@ public class ManifoldCF extends org.apac } /** List transformation connectors */ - protected static int apiReadTransformationConnectors(IThreadContext tc, Configuration output) + protected static int apiReadTransformationConnectors(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + // List registered transformation connectors try { @@ -2356,9 +2453,12 @@ public class ManifoldCF extends org.apac } /** List authority connectors */ - protected static int apiReadAuthorityConnectors(IThreadContext tc, Configuration output) + protected static int apiReadAuthorityConnectors(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + // List registered authority connectors try { @@ -2393,9 +2493,12 @@ public class ManifoldCF extends org.apac } /** List mapping connectors */ - protected static int apiReadMappingConnectors(IThreadContext tc, Configuration output) + protected static int apiReadMappingConnectors(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + // List registered authority connectors try { @@ -2430,9 +2533,12 @@ public class ManifoldCF extends org.apac } /** List authorization domains */ - protected static int apiReadAuthorizationDomains(IThreadContext tc, Configuration output) + protected static int apiReadAuthorizationDomains(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + // List registered authorization domains try { @@ -2468,9 +2574,12 @@ public class ManifoldCF extends org.apac } /** List repository connectors */ - protected static int apiReadRepositoryConnectors(IThreadContext tc, Configuration output) + protected static int apiReadRepositoryConnectors(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + // List registered repository connectors try { @@ -2505,9 +2614,12 @@ public class ManifoldCF extends org.apac } /** List notification connectors */ - protected static int apiReadNotificationConnectors(IThreadContext tc, Configuration output) + protected static int apiReadNotificationConnectors(IThreadContext tc, Configuration output, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + // List registered notification connectors try { @@ -2568,8 +2680,11 @@ public class ManifoldCF extends org.apac /** Queue reports */ protected static int apiReadRepositoryConnectionQueue(IThreadContext tc, Configuration output, - String connectionName, Map<String,List<String>> queryParameters) throws ManifoldCFException + String connectionName, Map<String,List<String>> queryParameters, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_REPORTS)) + return READRESULT_NOTALLOWED; + if (queryParameters == null) queryParameters = new HashMap<String,List<String>>(); @@ -2765,8 +2880,11 @@ public class ManifoldCF extends org.apac /** Get jobs for connection */ protected static int apiReadRepositoryConnectionJobs(IThreadContext tc, Configuration output, - String connectionName) throws ManifoldCFException + String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_JOBS)) + return READRESULT_NOTALLOWED; + try { IJobManager jobManager = JobManagerFactory.make(tc); @@ -2793,8 +2911,11 @@ public class ManifoldCF extends org.apac /** History reports */ protected static int apiReadRepositoryConnectionHistory(IThreadContext tc, Configuration output, - String connectionName, Map<String,List<String>> queryParameters) throws ManifoldCFException + String connectionName, Map<String,List<String>> queryParameters, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_REPORTS)) + return READRESULT_NOTALLOWED; + if (queryParameters == null) queryParameters = new HashMap<String,List<String>>(); @@ -3129,9 +3250,12 @@ public class ManifoldCF extends org.apac } /** Read the activity list for a given connection name. */ - protected static int apiReadRepositoryConnectionActivities(IThreadContext tc, Configuration output, String connectionName) + protected static int apiReadRepositoryConnectionActivities(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_VIEW_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { String[] activities = getActivitiesList(tc,connectionName); @@ -3161,40 +3285,40 @@ public class ManifoldCF extends org.apac *@return read status - either found, not found, or bad args */ public static int executeReadCommand(IThreadContext tc, Configuration output, String path, - Map<String,List<String>> queryParameters) throws ManifoldCFException + Map<String,List<String>> queryParameters, IAuthorizer authorizer) throws ManifoldCFException { if (path.equals("jobs")) { - return apiReadJobs(tc,output); + return apiReadJobs(tc,output,authorizer); } else if (path.startsWith("jobs/")) { Long jobID = new Long(path.substring("jobs/".length())); - return apiReadJob(tc,output,jobID); + return apiReadJob(tc,output,jobID,authorizer); } else if (path.startsWith("repositoryconnectionactivities/")) { int firstSeparator = "repositoryconnectionactivities/".length(); String connectionName = decodeAPIPathElement(path.substring(firstSeparator)); - return apiReadRepositoryConnectionActivities(tc,output,connectionName); + return apiReadRepositoryConnectionActivities(tc,output,connectionName,authorizer); } else if (path.startsWith("repositoryconnectionhistory/")) { int firstSeparator = "repositoryconnectionhistory/".length(); String connectionName = decodeAPIPathElement(path.substring(firstSeparator)); - return apiReadRepositoryConnectionHistory(tc,output,connectionName,queryParameters); + return apiReadRepositoryConnectionHistory(tc,output,connectionName,queryParameters,authorizer); } else if (path.startsWith("repositoryconnectionqueue/")) { int firstSeparator = "repositoryconnectionqueue/".length(); String connectionName = decodeAPIPathElement(path.substring(firstSeparator)); - return apiReadRepositoryConnectionQueue(tc,output,connectionName,queryParameters); + return apiReadRepositoryConnectionQueue(tc,output,connectionName,queryParameters,authorizer); } else if (path.startsWith("repositoryconnectionjobs/")) { int firstSeparator = "repositoryconnectionjobs/".length(); String connectionName = decodeAPIPathElement(path.substring(firstSeparator)); - return apiReadRepositoryConnectionJobs(tc,output,connectionName); + return apiReadRepositoryConnectionJobs(tc,output,connectionName,authorizer); } else if (path.startsWith("status/")) { @@ -3211,27 +3335,27 @@ public class ManifoldCF extends org.apac if (connectionType.equals("outputconnections")) { - return apiReadOutputConnectionStatus(tc,output,connectionName); + return apiReadOutputConnectionStatus(tc,output,connectionName,authorizer); } else if (connectionType.equals("transformationconnections")) { - return apiReadTransformationConnectionStatus(tc,output,connectionName); + return apiReadTransformationConnectionStatus(tc,output,connectionName,authorizer); } else if (connectionType.equals("mappingconnections")) { - return apiReadMappingConnectionStatus(tc,output,connectionName); + return apiReadMappingConnectionStatus(tc,output,connectionName,authorizer); } else if (connectionType.equals("authorityconnections")) { - return apiReadAuthorityConnectionStatus(tc,output,connectionName); + return apiReadAuthorityConnectionStatus(tc,output,connectionName,authorizer); } else if (connectionType.equals("repositoryconnections")) { - return apiReadRepositoryConnectionStatus(tc,output,connectionName); + return apiReadRepositoryConnectionStatus(tc,output,connectionName,authorizer); } else if (connectionType.equals("notificationconnections")) { - return apiReadNotificationConnectionStatus(tc,output,connectionName); + return apiReadNotificationConnectionStatus(tc,output,connectionName,authorizer); } else { @@ -3262,19 +3386,19 @@ public class ManifoldCF extends org.apac if (connectionType.equals("outputconnections")) { - return apiReadOutputConnectionInfo(tc,output,connectionName,command); + return apiReadOutputConnectionInfo(tc,output,connectionName,command,authorizer); } else if (connectionType.equals("transformationconnections")) { - return apiReadTransformationConnectionInfo(tc,output,connectionName,command); + return apiReadTransformationConnectionInfo(tc,output,connectionName,command,authorizer); } else if (connectionType.equals("repositoryconnections")) { - return apiReadRepositoryConnectionInfo(tc,output,connectionName,command); + return apiReadRepositoryConnectionInfo(tc,output,connectionName,command,authorizer); } else if (connectionType.equals("notificationconnections")) { - return apiReadNotificationConnectionInfo(tc,output,connectionName,command); + return apiReadNotificationConnectionInfo(tc,output,connectionName,command,authorizer); } else { @@ -3284,112 +3408,112 @@ public class ManifoldCF extends org.apac } else if (path.equals("jobstatuses")) { - return apiReadJobStatuses(tc,output,queryParameters); + return apiReadJobStatuses(tc,output,queryParameters,authorizer); } else if (path.startsWith("jobstatuses/")) { Long jobID = new Long(path.substring("jobstatuses/".length())); - return apiReadJobStatus(tc,output,jobID,queryParameters); + return apiReadJobStatus(tc,output,jobID,queryParameters,authorizer); } else if (path.equals("jobstatusesnocounts")) { - return apiReadJobStatusesNoCounts(tc,output); + return apiReadJobStatusesNoCounts(tc,output,authorizer); } else if (path.startsWith("jobstatusesnocounts/")) { Long jobID = new Long(path.substring("jobstatusesnocounts/".length())); - return apiReadJobStatusNoCounts(tc,output,jobID); + return apiReadJobStatusNoCounts(tc,output,jobID,authorizer); } else if (path.equals("authoritygroups")) { - return apiReadAuthorityGroups(tc,output); + return apiReadAuthorityGroups(tc,output,authorizer); } else if (path.startsWith("authoritygroups/")) { String groupName = decodeAPIPathElement(path.substring("authoritygroups/".length())); - return apiReadAuthorityGroup(tc,output,groupName); + return apiReadAuthorityGroup(tc,output,groupName,authorizer); } else if (path.equals("outputconnections")) { - return apiReadOutputConnections(tc,output); + return apiReadOutputConnections(tc,output,authorizer); } else if (path.startsWith("outputconnections/")) { String connectionName = decodeAPIPathElement(path.substring("outputconnections/".length())); - return apiReadOutputConnection(tc,output,connectionName); + return apiReadOutputConnection(tc,output,connectionName,authorizer); } else if (path.equals("transformationconnections")) { - return apiReadTransformationConnections(tc,output); + return apiReadTransformationConnections(tc,output,authorizer); } else if (path.startsWith("transformationconnections/")) { String connectionName = decodeAPIPathElement(path.substring("transformationconnections/".length())); - return apiReadTransformationConnection(tc,output,connectionName); + return apiReadTransformationConnection(tc,output,connectionName,authorizer); } else if (path.equals("mappingconnections")) { - return apiReadMappingConnections(tc,output); + return apiReadMappingConnections(tc,output,authorizer); } else if (path.startsWith("mappingconnections/")) { String connectionName = decodeAPIPathElement(path.substring("mappingconnections/".length())); - return apiReadMappingConnection(tc,output,connectionName); + return apiReadMappingConnection(tc,output,connectionName,authorizer); } else if (path.equals("authorityconnections")) { - return apiReadAuthorityConnections(tc,output); + return apiReadAuthorityConnections(tc,output,authorizer); } else if (path.startsWith("authorityconnections/")) { String connectionName = decodeAPIPathElement(path.substring("authorityconnections/".length())); - return apiReadAuthorityConnection(tc,output,connectionName); + return apiReadAuthorityConnection(tc,output,connectionName,authorizer); } else if (path.equals("repositoryconnections")) { - return apiReadRepositoryConnections(tc,output); + return apiReadRepositoryConnections(tc,output,authorizer); } else if (path.startsWith("repositoryconnections/")) { String connectionName = decodeAPIPathElement(path.substring("repositoryconnections/".length())); - return apiReadRepositoryConnection(tc,output,connectionName); + return apiReadRepositoryConnection(tc,output,connectionName,authorizer); } else if (path.equals("notificationconnections")) { - return apiReadNotificationConnections(tc,output); + return apiReadNotificationConnections(tc,output,authorizer); } else if (path.startsWith("notificationconnections/")) { String connectionName = decodeAPIPathElement(path.substring("notificationconnections/".length())); - return apiReadNotificationConnection(tc,output,connectionName); + return apiReadNotificationConnection(tc,output,connectionName,authorizer); } else if (path.equals("outputconnectors")) { - return apiReadOutputConnectors(tc,output); + return apiReadOutputConnectors(tc,output,authorizer); } else if (path.equals("transformationconnectors")) { - return apiReadTransformationConnectors(tc,output); + return apiReadTransformationConnectors(tc,output,authorizer); } else if (path.equals("mappingconnectors")) { - return apiReadMappingConnectors(tc,output); + return apiReadMappingConnectors(tc,output,authorizer); } else if (path.equals("authorityconnectors")) { - return apiReadAuthorityConnectors(tc,output); + return apiReadAuthorityConnectors(tc,output,authorizer); } else if (path.equals("repositoryconnectors")) { - return apiReadRepositoryConnectors(tc,output); + return apiReadRepositoryConnectors(tc,output,authorizer); } else if (path.equals("notificationconnectors")) { - return apiReadNotificationConnectors(tc,output); + return apiReadNotificationConnectors(tc,output,authorizer); } else if (path.equals("authorizationdomains")) { - return apiReadAuthorizationDomains(tc,output); + return apiReadAuthorizationDomains(tc,output,authorizer); } else { @@ -3402,12 +3526,16 @@ public class ManifoldCF extends org.apac public static final int POSTRESULT_NOTFOUND = 0; public static final int POSTRESULT_FOUND = 1; public static final int POSTRESULT_CREATED = 2; + public static final int POSTRESULT_NOTALLOWED = 3; /** Post job. */ - protected static int apiPostJob(IThreadContext tc, Configuration output, Configuration input) + protected static int apiPostJob(IThreadContext tc, Configuration output, Configuration input, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_JOBS)) + return READRESULT_NOTALLOWED; + ConfigurationNode jobNode = findConfigurationNode(input,API_JOBNODE); if (jobNode == null) throw new ManifoldCFException("Input must have '"+API_JOBNODE+"' field"); @@ -3449,12 +3577,12 @@ public class ManifoldCF extends org.apac *@param input is the input object. *@return write result - either "not found", "found", or "created". */ - public static int executePostCommand(IThreadContext tc, Configuration output, String path, Configuration input) + public static int executePostCommand(IThreadContext tc, Configuration output, String path, Configuration input, IAuthorizer authorizer) throws ManifoldCFException { if (path.equals("jobs")) { - return apiPostJob(tc,output,input); + return apiPostJob(tc,output,input,authorizer); } else { @@ -3467,12 +3595,16 @@ public class ManifoldCF extends org.apac public static final int WRITERESULT_NOTFOUND = 0; public static final int WRITERESULT_FOUND = 1; public static final int WRITERESULT_CREATED = 2; + public static final int WRITERESULT_NOTALLOWED = 3; /** Start a job. */ - protected static int apiWriteStartJob(IThreadContext tc, Configuration output, Long jobID, boolean requestMinimum) + protected static int apiWriteStartJob(IThreadContext tc, Configuration output, Long jobID, boolean requestMinimum, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_RUN_JOBS)) + return READRESULT_NOTALLOWED; + try { IJobManager jobManager = JobManagerFactory.make(tc); @@ -3488,9 +3620,12 @@ public class ManifoldCF extends org.apac /** Abort a job. */ - protected static int apiWriteAbortJob(IThreadContext tc, Configuration output, Long jobID) + protected static int apiWriteAbortJob(IThreadContext tc, Configuration output, Long jobID, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_RUN_JOBS)) + return READRESULT_NOTALLOWED; + try { IJobManager jobManager = JobManagerFactory.make(tc); @@ -3506,9 +3641,12 @@ public class ManifoldCF extends org.apac /** Restart a job. */ - protected static int apiWriteRestartJob(IThreadContext tc, Configuration output, Long jobID, boolean requestMinimum) + protected static int apiWriteRestartJob(IThreadContext tc, Configuration output, Long jobID, boolean requestMinimum, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_RUN_JOBS)) + return READRESULT_NOTALLOWED; + try { IJobManager jobManager = JobManagerFactory.make(tc); @@ -3524,9 +3662,12 @@ public class ManifoldCF extends org.apac /** Pause a job. */ - protected static int apiWritePauseJob(IThreadContext tc, Configuration output, Long jobID) + protected static int apiWritePauseJob(IThreadContext tc, Configuration output, Long jobID, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_RUN_JOBS)) + return READRESULT_NOTALLOWED; + try { IJobManager jobManager = JobManagerFactory.make(tc); @@ -3542,9 +3683,12 @@ public class ManifoldCF extends org.apac /** Resume a job. */ - protected static int apiWriteResumeJob(IThreadContext tc, Configuration output, Long jobID) + protected static int apiWriteResumeJob(IThreadContext tc, Configuration output, Long jobID, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_RUN_JOBS)) + return READRESULT_NOTALLOWED; + try { IJobManager jobManager = JobManagerFactory.make(tc); @@ -3560,9 +3704,12 @@ public class ManifoldCF extends org.apac /** Reset incremental seeding for a job. */ - protected static int apiWriteReseedJob(IThreadContext tc, Configuration output, Long jobID) + protected static int apiWriteReseedJob(IThreadContext tc, Configuration output, Long jobID, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_RUN_JOBS)) + return READRESULT_NOTALLOWED; + try { IJobManager jobManager = JobManagerFactory.make(tc); @@ -3578,9 +3725,12 @@ public class ManifoldCF extends org.apac /** Write job. */ - protected static int apiWriteJob(IThreadContext tc, Configuration output, Configuration input, Long jobID) + protected static int apiWriteJob(IThreadContext tc, Configuration output, Configuration input, Long jobID, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_JOBS)) + return READRESULT_NOTALLOWED; + ConfigurationNode jobNode = findConfigurationNode(input,API_JOBNODE); if (jobNode == null) throw new ManifoldCFException("Input must have '"+API_JOBNODE+"' field"); @@ -3616,9 +3766,12 @@ public class ManifoldCF extends org.apac /** Write authority group. */ - protected static int apiWriteAuthorityGroup(IThreadContext tc, Configuration output, Configuration input, String groupName) + protected static int apiWriteAuthorityGroup(IThreadContext tc, Configuration output, Configuration input, String groupName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + ConfigurationNode groupNode = findConfigurationNode(input,API_AUTHORITYGROUPNODE); if (groupNode == null) throw new ManifoldCFException("Input argument must have '"+API_AUTHORITYGROUPNODE+"' field"); @@ -3651,9 +3804,12 @@ public class ManifoldCF extends org.apac /** Write output connection. */ - protected static int apiWriteOutputConnection(IThreadContext tc, Configuration output, Configuration input, String connectionName) + protected static int apiWriteOutputConnection(IThreadContext tc, Configuration output, Configuration input, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + ConfigurationNode connectionNode = findConfigurationNode(input,API_OUTPUTCONNECTIONNODE); if (connectionNode == null) throw new ManifoldCFException("Input argument must have '"+API_OUTPUTCONNECTIONNODE+"' field"); @@ -3686,9 +3842,12 @@ public class ManifoldCF extends org.apac /** Write transformation connection. */ - protected static int apiWriteTransformationConnection(IThreadContext tc, Configuration output, Configuration input, String connectionName) + protected static int apiWriteTransformationConnection(IThreadContext tc, Configuration output, Configuration input, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + ConfigurationNode connectionNode = findConfigurationNode(input,API_TRANSFORMATIONCONNECTIONNODE); if (connectionNode == null) throw new ManifoldCFException("Input argument must have '"+API_TRANSFORMATIONCONNECTIONNODE+"' field"); @@ -3721,9 +3880,12 @@ public class ManifoldCF extends org.apac /** Write authority connection. */ - protected static int apiWriteAuthorityConnection(IThreadContext tc, Configuration output, Configuration input, String connectionName) + protected static int apiWriteAuthorityConnection(IThreadContext tc, Configuration output, Configuration input, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + ConfigurationNode connectionNode = findConfigurationNode(input,API_AUTHORITYCONNECTIONNODE); if (connectionNode == null) throw new ManifoldCFException("Input argument must have '"+API_AUTHORITYCONNECTIONNODE+"' field"); @@ -3756,9 +3918,12 @@ public class ManifoldCF extends org.apac /** Write mapping connection. */ - protected static int apiWriteMappingConnection(IThreadContext tc, Configuration output, Configuration input, String connectionName) + protected static int apiWriteMappingConnection(IThreadContext tc, Configuration output, Configuration input, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + ConfigurationNode connectionNode = findConfigurationNode(input,API_MAPPINGCONNECTIONNODE); if (connectionNode == null) throw new ManifoldCFException("Input argument must have '"+API_MAPPINGCONNECTIONNODE+"' field"); @@ -3791,9 +3956,12 @@ public class ManifoldCF extends org.apac /** Write repository connection. */ - protected static int apiWriteRepositoryConnection(IThreadContext tc, Configuration output, Configuration input, String connectionName) + protected static int apiWriteRepositoryConnection(IThreadContext tc, Configuration output, Configuration input, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + ConfigurationNode connectionNode = findConfigurationNode(input,API_REPOSITORYCONNECTIONNODE); if (connectionNode == null) throw new ManifoldCFException("Input argument must have '"+API_REPOSITORYCONNECTIONNODE+"' field"); @@ -3826,9 +3994,12 @@ public class ManifoldCF extends org.apac /** Clear repository connection history. */ - protected static int apiWriteClearHistoryRepositoryConnection(IThreadContext tc, Configuration output, String connectionName) + protected static int apiWriteClearHistoryRepositoryConnection(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IRepositoryConnectionManager connectionManager = RepositoryConnectionManagerFactory.make(tc); @@ -3844,9 +4015,12 @@ public class ManifoldCF extends org.apac /** Write notification connection. */ - protected static int apiWriteNotificationConnection(IThreadContext tc, Configuration output, Configuration input, String connectionName) + protected static int apiWriteNotificationConnection(IThreadContext tc, Configuration output, Configuration input, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + ConfigurationNode connectionNode = findConfigurationNode(input,API_NOTIFICATIONCONNECTIONNODE); if (connectionNode == null) throw new ManifoldCFException("Input argument must have '"+API_NOTIFICATIONCONNECTIONNODE+"' field"); @@ -3879,9 +4053,12 @@ public class ManifoldCF extends org.apac /** Reset output connection (reset version of all recorded documents). */ - protected static int apiWriteClearVersionsOutputConnection(IThreadContext tc, Configuration output, String connectionName) + protected static int apiWriteClearVersionsOutputConnection(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { signalOutputConnectionRedo(tc,connectionName); @@ -3896,9 +4073,12 @@ public class ManifoldCF extends org.apac /** Clear output connection (remove all recorded documents). */ - protected static int apiWriteClearOutputConnection(IThreadContext tc, Configuration output, String connectionName) + protected static int apiWriteClearOutputConnection(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { signalOutputConnectionRemoved(tc,connectionName); @@ -3918,94 +4098,94 @@ public class ManifoldCF extends org.apac *@param input is the input object. *@return write result - either "not found", "found", or "created". */ - public static int executeWriteCommand(IThreadContext tc, Configuration output, String path, Configuration input) + public static int executeWriteCommand(IThreadContext tc, Configuration output, String path, Configuration input, IAuthorizer authorizer) throws ManifoldCFException { if (path.startsWith("start/")) { Long jobID = new Long(path.substring("start/".length())); - return apiWriteStartJob(tc,output,jobID,false); + return apiWriteStartJob(tc,output,jobID,false,authorizer); } else if (path.startsWith("startminimal/")) { Long jobID = new Long(path.substring("startminimal/".length())); - return apiWriteStartJob(tc,output,jobID,true); + return apiWriteStartJob(tc,output,jobID,true,authorizer); } else if (path.startsWith("abort/")) { Long jobID = new Long(path.substring("abort/".length())); - return apiWriteAbortJob(tc,output,jobID); + return apiWriteAbortJob(tc,output,jobID,authorizer); } else if (path.startsWith("restart/")) { Long jobID = new Long(path.substring("restart/".length())); - return apiWriteRestartJob(tc,output,jobID,false); + return apiWriteRestartJob(tc,output,jobID,false,authorizer); } else if (path.startsWith("restartminimal/")) { Long jobID = new Long(path.substring("restartminimal/".length())); - return apiWriteRestartJob(tc,output,jobID,true); + return apiWriteRestartJob(tc,output,jobID,true,authorizer); } else if (path.startsWith("pause/")) { Long jobID = new Long(path.substring("pause/".length())); - return apiWritePauseJob(tc,output,jobID); + return apiWritePauseJob(tc,output,jobID,authorizer); } else if (path.startsWith("resume/")) { Long jobID = new Long(path.substring("resume/".length())); - return apiWriteResumeJob(tc,output,jobID); + return apiWriteResumeJob(tc,output,jobID,authorizer); } else if (path.startsWith("reseed/")) { Long jobID = new Long(path.substring("reseed/".length())); - return apiWriteReseedJob(tc,output,jobID); + return apiWriteReseedJob(tc,output,jobID,authorizer); } else if (path.startsWith("jobs/")) { Long jobID = new Long(path.substring("jobs/".length())); - return apiWriteJob(tc,output,input,jobID); + return apiWriteJob(tc,output,input,jobID,authorizer); } else if (path.startsWith("authoritygroups/")) { String groupName = decodeAPIPathElement(path.substring("authoritygroups/".length())); - return apiWriteAuthorityGroup(tc,output,input,groupName); + return apiWriteAuthorityGroup(tc,output,input,groupName,authorizer); } else if (path.startsWith("outputconnections/")) { String connectionName = decodeAPIPathElement(path.substring("outputconnections/".length())); - return apiWriteOutputConnection(tc,output,input,connectionName); + return apiWriteOutputConnection(tc,output,input,connectionName,authorizer); } else if (path.startsWith("transformationconnections/")) { String connectionName = decodeAPIPathElement(path.substring("transformationconnections/".length())); - return apiWriteTransformationConnection(tc,output,input,connectionName); + return apiWriteTransformationConnection(tc,output,input,connectionName,authorizer); } else if (path.startsWith("mappingconnections/")) { String connectionName = decodeAPIPathElement(path.substring("mappingconnections/".length())); - return apiWriteMappingConnection(tc,output,input,connectionName); + return apiWriteMappingConnection(tc,output,input,connectionName,authorizer); } else if (path.startsWith("authorityconnections/")) { String connectionName = decodeAPIPathElement(path.substring("authorityconnections/".length())); - return apiWriteAuthorityConnection(tc,output,input,connectionName); + return apiWriteAuthorityConnection(tc,output,input,connectionName,authorizer); } else if (path.startsWith("repositoryconnections/")) { String connectionName = decodeAPIPathElement(path.substring("repositoryconnections/".length())); - return apiWriteRepositoryConnection(tc,output,input,connectionName); + return apiWriteRepositoryConnection(tc,output,input,connectionName,authorizer); } else if (path.startsWith("notificationconnections/")) { String connectionName = decodeAPIPathElement(path.substring("notificationconnections/".length())); - return apiWriteNotificationConnection(tc,output,input,connectionName); + return apiWriteNotificationConnection(tc,output,input,connectionName,authorizer); } else if (path.startsWith("clearhistory/")) { int firstSeparator = "clearhistory/".length(); String connectionName = decodeAPIPathElement(path.substring(firstSeparator)); - return apiWriteClearHistoryRepositoryConnection(tc,output,connectionName); + return apiWriteClearHistoryRepositoryConnection(tc,output,connectionName,authorizer); } else if (path.startsWith("reset/")) { @@ -4023,7 +4203,7 @@ public class ManifoldCF extends org.apac if (connectionType.equals("outputconnections")) { - return apiWriteClearVersionsOutputConnection(tc,output,connectionName); + return apiWriteClearVersionsOutputConnection(tc,output,connectionName,authorizer); } else { @@ -4035,13 +4215,13 @@ public class ManifoldCF extends org.apac { int firstSeparator = "clearversions/".length(); String connectionName = decodeAPIPathElement(path.substring(firstSeparator)); - return apiWriteClearVersionsOutputConnection(tc,output,connectionName); + return apiWriteClearVersionsOutputConnection(tc,output,connectionName,authorizer); } else if (path.startsWith("clearrecords/")) { int firstSeparator = "clearrecords/".length(); String connectionName = decodeAPIPathElement(path.substring(firstSeparator)); - return apiWriteClearOutputConnection(tc,output,connectionName); + return apiWriteClearOutputConnection(tc,output,connectionName,authorizer); } else { @@ -4053,12 +4233,16 @@ public class ManifoldCF extends org.apac // Delete result codes public static final int DELETERESULT_NOTFOUND = 0; public static final int DELETERESULT_FOUND = 1; - + public static final int DELETERESULT_NOTALLOWED = 2; + /** Delete a job. */ - protected static int apiDeleteJob(IThreadContext tc, Configuration output, Long jobID) + protected static int apiDeleteJob(IThreadContext tc, Configuration output, Long jobID, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_JOBS)) + return READRESULT_NOTALLOWED; + try { IJobManager jobManager = JobManagerFactory.make(tc); @@ -4073,9 +4257,12 @@ public class ManifoldCF extends org.apac /** Delete authority group. */ - protected static int apiDeleteAuthorityGroup(IThreadContext tc, Configuration output, String groupName) + protected static int apiDeleteAuthorityGroup(IThreadContext tc, Configuration output, String groupName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IAuthorityGroupManager groupManager = AuthorityGroupManagerFactory.make(tc); @@ -4090,9 +4277,12 @@ public class ManifoldCF extends org.apac /** Delete output connection. */ - protected static int apiDeleteOutputConnection(IThreadContext tc, Configuration output, String connectionName) + protected static int apiDeleteOutputConnection(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IOutputConnectionManager connectionManager = OutputConnectionManagerFactory.make(tc); @@ -4107,9 +4297,12 @@ public class ManifoldCF extends org.apac /** Delete authority connection. */ - protected static int apiDeleteAuthorityConnection(IThreadContext tc, Configuration output, String connectionName) + protected static int apiDeleteAuthorityConnection(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IAuthorityConnectionManager connectionManager = AuthorityConnectionManagerFactory.make(tc); @@ -4124,9 +4317,12 @@ public class ManifoldCF extends org.apac /** Delete repository connection. */ - protected static int apiDeleteRepositoryConnection(IThreadContext tc, Configuration output, String connectionName) + protected static int apiDeleteRepositoryConnection(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { IRepositoryConnectionManager connectionManager = RepositoryConnectionManagerFactory.make(tc); @@ -4141,9 +4337,12 @@ public class ManifoldCF extends org.apac /** Delete notification connection. */ - protected static int apiDeleteNotificationConnection(IThreadContext tc, Configuration output, String connectionName) + protected static int apiDeleteNotificationConnection(IThreadContext tc, Configuration output, String connectionName, IAuthorizer authorizer) throws ManifoldCFException { + if (!authorizer.checkAllowed(tc, IAuthorizer.CAPABILITY_EDIT_CONNECTIONS)) + return READRESULT_NOTALLOWED; + try { INotificationConnectionManager connectionManager = NotificationConnectionManagerFactory.make(tc); @@ -4162,38 +4361,38 @@ public class ManifoldCF extends org.apac *@param path is the object path. *@return delete result code */ - public static int executeDeleteCommand(IThreadContext tc, Configuration output, String path) + public static int executeDeleteCommand(IThreadContext tc, Configuration output, String path, IAuthorizer authorizer) throws ManifoldCFException { if (path.startsWith("jobs/")) { Long jobID = new Long(path.substring("jobs/".length())); - return apiDeleteJob(tc,output,jobID); + return apiDeleteJob(tc,output,jobID,authorizer); } else if (path.startsWith("authoritygroups/")) { String groupName = decodeAPIPathElement(path.substring("authoritygroups/".length())); - return apiDeleteAuthorityGroup(tc,output,groupName); + return apiDeleteAuthorityGroup(tc,output,groupName,authorizer); } else if (path.startsWith("outputconnections/")) { String connectionName = decodeAPIPathElement(path.substring("outputconnections/".length())); - return apiDeleteOutputConnection(tc,output,connectionName); + return apiDeleteOutputConnection(tc,output,connectionName,authorizer); } else if (path.startsWith("authorityconnections/")) { String connectionName = decodeAPIPathElement(path.substring("authorityconnections/".length())); - return apiDeleteAuthorityConnection(tc,output,connectionName); + return apiDeleteAuthorityConnection(tc,output,connectionName,authorizer); } else if (path.startsWith("repositoryconnections/")) { String connectionName = decodeAPIPathElement(path.substring("repositoryconnections/".length())); - return apiDeleteRepositoryConnection(tc,output,connectionName); + return apiDeleteRepositoryConnection(tc,output,connectionName,authorizer); } else if (path.startsWith("notificationconnections/")) { String connectionName = decodeAPIPathElement(path.substring("notificationconnections/".length())); - return apiDeleteNotificationConnection(tc,output,connectionName); + return apiDeleteNotificationConnection(tc,output,connectionName,authorizer); } else {
Modified: manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/beans/APIProfile.java URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/beans/APIProfile.java?rev=1689231&r1=1689230&r2=1689231&view=diff ============================================================================== --- manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/beans/APIProfile.java (original) +++ manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/beans/APIProfile.java Sun Jul 5 10:17:59 2015 @@ -29,7 +29,7 @@ import org.apache.manifoldcf.core.system * session model for the application. This particular bean maintains the user (against * the IAdminUserManager service). */ -public class APIProfile implements HttpSessionBindingListener +public class APIProfile implements HttpSessionBindingListener, IAuthorizer { public static final String _rcsid = "@(#)$Id$"; @@ -85,8 +85,9 @@ public class APIProfile implements HttpS sessionCleanup(); try { + IAuth auth = AuthFactory.make(threadContext); // Check if everything is in place. - if (ManifoldCF.verifyAPILogin(threadContext,userID,userPassword)) + if (auth.verifyAPILogin(userID,userPassword)) { isLoggedIn = true; loginTime = System.currentTimeMillis(); @@ -134,10 +135,22 @@ public class APIProfile implements HttpS loginTime = -1L; } + /** Check user capability */ + @Override + public boolean checkAllowed(final IThreadContext threadContext, final int capability) + throws ManifoldCFException + { + if (!isLoggedIn) + return false; + IAuth auth = AuthFactory.make(threadContext); + // Check if everything is in place. + return auth.checkCapability(userID,capability); + } //***************************************************************** // Bind listener api - support session invalidation // vis logout or timeout + @Override public void valueBound(HttpSessionBindingEvent e) { HttpSession ss = e.getSession(); @@ -148,6 +161,7 @@ public class APIProfile implements HttpS } } + @Override public void valueUnbound(HttpSessionBindingEvent e) { sessionCleanup(); Modified: manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/beans/AdminProfile.java URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/beans/AdminProfile.java?rev=1689231&r1=1689230&r2=1689231&view=diff ============================================================================== --- manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/beans/AdminProfile.java (original) +++ manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/beans/AdminProfile.java Sun Jul 5 10:17:59 2015 @@ -30,7 +30,7 @@ import org.apache.manifoldcf.ui.password * session model for the application. This particular bean maintains the user (against * the IAdminUserManager service). */ -public class AdminProfile implements HttpSessionBindingListener +public class AdminProfile implements HttpSessionBindingListener, IAuthorizer { public static final String _rcsid = "@(#)$Id: AdminProfile.java 988245 2010-08-23 18:39:35Z kwright $"; @@ -98,8 +98,9 @@ public class AdminProfile implements Htt sessionCleanup(); try { + IAuth auth = AuthFactory.make(threadContext); // Check if everything is in place. - if (ManifoldCF.verifyLogin(threadContext,userID,userPassword)) + if (auth.verifyUILogin(userID,userPassword)) { isLoggedIn = true; loginTime = System.currentTimeMillis(); @@ -159,10 +160,22 @@ public class AdminProfile implements Htt passwordMapper = null; } + /** Check user capability */ + @Override + public boolean checkAllowed(final IThreadContext threadContext, final int capability) + throws ManifoldCFException + { + if (!isLoggedIn) + return false; + IAuth auth = AuthFactory.make(threadContext); + // Check if everything is in place. + return auth.checkCapability(userID,capability); + } //***************************************************************** // Bind listener api - support session invalidation // vis logout or timeout + @Override public void valueBound(HttpSessionBindingEvent e) { HttpSession ss = e.getSession(); @@ -173,6 +186,7 @@ public class AdminProfile implements Htt } } + @Override public void valueUnbound(HttpSessionBindingEvent e) { sessionCleanup(); Modified: manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties?rev=1689231&r1=1689230&r2=1689231&view=diff ============================================================================== --- manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties (original) +++ manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties Sun Jul 5 10:17:59 2015 @@ -528,7 +528,6 @@ showjobstatus.Active=Active showjobstatus.Processed=Processed showjobstatus.RefreshStatus=Refresh status showjobstatus.Refresh=Refresh -showjobstatus.PleaseTryAgainLater=This page is unavailable due to maintenance operations. Please try again later. showjobstatus.StatusOfJobs=Status of Jobs showjobstatus.Notyetrun=Not yet run @@ -575,7 +574,6 @@ documentstatus.ExecuteThisQuery=Execute documentstatus.Continue=Continue documentstatus.PleaseSelectAtLeastOneJob=Please select at least one job documentstatus.PleaseSelectaConnection=Please select a connection -documentstatus.PleaseTryAgainLater=This page is unavailable due to maintenance operations. Please try again later. documentstatus.Previous=Previous documentstatus.Next=Next documentstatus.Rows=Rows: @@ -620,7 +618,6 @@ queuestatus.ExecuteThisQuery=Execute thi queuestatus.Continue=Continue queuestatus.PleaseSelectAtLeastOneJob=Please select at least one job queuestatus.PleaseSelectaConnection=Please select a connection -queuestatus.PleaseTryAgainLater=This page is unavailable due to maintenance operations. Please try again later. queuestatus.DocumentsThatHaveNeverBeenProcessed=Documents that have never been processed queuestatus.DocumentsProcessedAtLeastOnce=Documents processed at least once queuestatus.DocumentsOutOfScope=Documents that are out of scope @@ -696,7 +693,6 @@ simplereport.Next=Next simplereport.Rows=Rows: simplereport.RowsPerPage=Rows per page: simplereport.PleaseSelectAConnection=Please select a connection -simplereport.PleaseTryAgainLater=This page is unavailable due to maintenance operations. Please try again later. simplereport.EnterALegalNumberForRowsPerPage=Enter a legal number for rows per page simplereport.EntityMatchMustBeAValidRegularExpression=Entity match must be a valid regular expression simplereport.ResultCodeMatchMustBeAValidRegularExpression=Result code match must be a valid regular expression @@ -738,7 +734,6 @@ maxactivityreport.Next=Next maxactivityreport.Rows=Rows: maxactivityreport.RowsPerPage=Rows per page: maxactivityreport.PleaseSelectAConnection=Please select a connection -maxactivityreport.PleaseTryAgainLater=This page is unavailable due to maintenance operations. Please try again later. maxactivityreport.EnterALegalNumberForRowsPerPage=Enter a legal number for rows per page maxactivityreport.EnterALegalIntervalSizeInMinutes=Enter a legal interval size, in minutes maxactivityreport.IdentifierClassDescriptionCannotBeEmpty=Identifier class description cannot be empty @@ -783,7 +778,6 @@ maxbandwidthreport.NextPage=Next page maxbandwidthreport.Next=Next maxbandwidthreport.RowsPerPage=Rows per page: maxbandwidthreport.PleaseSelectAConnection=Please select a connection -maxbandwidthreport.PleaseTryAgainLater=This page is unavailable due to maintenance operations. Please try again later. maxbandwidthreport.HighestBandwidth2=Highest Bandwith maxbandwidthreport.Rows=Rows: maxbandwidthreport.Next=Next @@ -829,7 +823,6 @@ resultreport.Next=Next resultreport.Rows=Rows: resultreport.RowsPerPage=Rows per page: resultreport.PleaseSelectAConnection=Please select a connection -resultreport.PleaseTryAgainLater=This page is unavailable due to maintenance operations. Please try again later. resultreport.IdentifierClass=Identifier Class resultreport.ResultClass=Result Class resultreport.EventCount=Event Count @@ -849,6 +842,9 @@ error.Error=Error! error.Return=Return error.Unauthorized=Apache ManifoldCF: Unauthorized activity error.UnauthorizedAccess=You do not have permissions to perform this activity +error.ApacheManifoldCFMaintenanceUnderway=Apache ManifoldCF: Maintenance underway +error.MaintenanceUnderway=Maintenance underway +error.PleaseTryAgainLater=This page is unavailable due to maintenance operations. Please try again later. viewjob.ApacheManifoldCFViewJob=Apache ManifoldCF: View Job viewjob.ViewAJob=View a Job Modified: manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties?rev=1689231&r1=1689230&r2=1689231&view=diff ============================================================================== --- manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties (original) +++ manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties Sun Jul 5 10:17:59 2015 @@ -528,7 +528,6 @@ showjobstatus.Active=ã¢ã¯ã� showjobstatus.Processed=æ¸ã¿ showjobstatus.RefreshStatus=ç¶æ ä¸è¦§ãæ´æ° showjobstatus.Refresh=æ´æ° -showjobstatus.PleaseTryAgainLater=ä¿å®å¦çä¸ã§ããå°ã ãå¾ ã¡ãã ããã showjobstatus.StatusOfJobs=ã¸ã§ãã®ç¶æ showjobstatus.Notyetrun=æªå®è¡ @@ -575,7 +574,6 @@ documentstatus.ExecuteThisQuery=ã¯ã documentstatus.Continue=次㸠documentstatus.PleaseSelectAtLeastOneJob=ã¸ã§ããä¸ã¤ä»¥ä¸é¸æãã¦ãã ãã documentstatus.PleaseSelectaConnection=ã³ãã¯ã·ã§ã³ã鏿ãã¦ãã ãã -documentstatus.PleaseTryAgainLater=ä¿å®å¦çä¸ã§ããå°ã ãå¾ ã¡ãã ããã documentstatus.Previous=å㸠documentstatus.Next=次㸠documentstatus.Rows=è¡ï¼ @@ -620,7 +618,6 @@ queuestatus.ExecuteThisQuery=ã¯ã� queuestatus.Continue=次㸠queuestatus.PleaseSelectAtLeastOneJob=ã¸ã§ããä¸ã¤ä»¥ä¸é¸æãã¦ãã ãã queuestatus.PleaseSelectaConnection=ã³ãã¯ã·ã§ã³ã鏿ãã¦ãã ãã -queuestatus.PleaseTryAgainLater=ä¿å®å¦çä¸ã§ããå°ã ãå¾ ã¡ãã ããã queuestatus.DocumentsThatHaveNeverBeenProcessed=å¦çãä¸åº¦ãããã¦ããªãã³ã³ãã³ã queuestatus.DocumentsProcessedAtLeastOnce=ï¼å以ä¸å¦çãããã³ã³ãã³ã queuestatus.DocumentsOutOfScope=ç¯å²å¤ã§ããææ¸ @@ -696,7 +693,6 @@ simplereport.Next=次㸠simplereport.Rows=Rows: simplereport.RowsPerPage=è¡ï¼ãã¼ã¸ï¼ simplereport.PleaseSelectAConnection=ã³ãã¯ã·ã§ã³ã鏿ãã¦ãã ãã -simplereport.PleaseTryAgainLater=ä¿å®å¦çä¸ã§ããå°ã ãå¾ ã¡ãã ããã simplereport.EnterALegalNumberForRowsPerPage=æ£ãããã¼ã¸æ¯ã®è¡æ°ãå ¥åãã¦ãã ãã simplereport.EntityMatchMustBeAValidRegularExpression=ã¨ã³ãã£ãã£ãã¿ã¼ã³ã¯æ£è¦è¡¨ç¾å¼ã«ä¸è´ããå¿ è¦ãããã¾ã simplereport.ResultCodeMatchMustBeAValidRegularExpression=çµæã³ã¼ãã¯æ£è¦è¡¨ç¾å¼ã«ä¸è´ããå¿ è¦ãããã¾ã @@ -738,7 +734,6 @@ maxactivityreport.Next=次㸠maxactivityreport.Rows=Rows: maxactivityreport.RowsPerPage=è¡ï¼ãã¼ã¸ï¼ maxactivityreport.PleaseSelectAConnection=ã³ãã¯ã·ã§ã³ã鏿ãã¦ãã ãã -maxactivityreport.PleaseTryAgainLater=ä¿å®å¦çä¸ã§ããå°ã ãå¾ ã¡ãã ããã maxactivityreport.EnterALegalNumberForRowsPerPage=æ£ãããã¼ã¸æ¯ã®è¡æ°ãå ¥åãã¦ãã ãã maxactivityreport.EnterALegalIntervalSizeInMinutes=æ£ããééå¤ãå ¥åãã¦ãã ããï¼åï¼ maxactivityreport.IdentifierClassDescriptionCannotBeEmpty=IDã¯ã©ã¹ãã¿ã¼ã³ãå ¥åãã¦ãã ãã @@ -784,7 +779,6 @@ maxbandwidthreport.NextPage=次㮠maxbandwidthreport.Next=次㸠maxbandwidthreport.RowsPerPage=è¡ï¼ãã¼ã¸ï¼ maxbandwidthreport.PleaseSelectAConnection=ã³ãã¯ã·ã§ã³ã鏿ãã¦ãã ãã -maxbandwidthreport.PleaseTryAgainLater=ä¿å®å¦çä¸ã§ããå°ã ãå¾ ã¡ãã ããã maxbandwidthreport.HighestBandwidth2=æå¤§ãã³ãå¹ maxbandwidthreport.Rows=è¡ï¼ maxbandwidthreport.Next=次㸠@@ -830,7 +824,6 @@ resultreport.Next=次㸠resultreport.Rows=è¡ï¼ resultreport.RowsPerPage=è¡ï¼ãã¼ã¸ï¼ resultreport.PleaseSelectAConnection=ã³ãã¯ã·ã§ã³ã鏿ãã¦ãã ãã -resultreport.PleaseTryAgainLater=ä¿å®å¦çä¸ã§ããå°ã ãå¾ ã¡ãã ããã resultreport.IdentifierClass=IDã¯ã©ã¹ resultreport.ResultClass=çµæã¯ã©ã¹ resultreport.EventCount=ã¤ãã³ãæ° @@ -850,6 +843,9 @@ error.Error=ã¨ã©ã¼ error.Return=æ»ã error.Unauthorized=Apache ManifoldCF: Unauthorized activity error.UnauthorizedAccess=You do not have permissions to perform this activity +error.ApacheManifoldCFMaintenanceUnderway=Apache ManifoldCF: Maintenance underway +error.MaintenanceUnderway=Maintenance underway +error.PleaseTryAgainLater=ä¿å®å¦çä¸ã§ããå°ã ãå¾ ã¡ãã ããã viewjob.ApacheManifoldCFViewJob=Apache ManifoldCFï¼ã¸ã§ãæ å ± viewjob.ViewAJob=ã¸ã§ãæ å ± Modified: manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_zh_CN.properties URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_zh_CN.properties?rev=1689231&r1=1689230&r2=1689231&view=diff ============================================================================== --- manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_zh_CN.properties (original) +++ manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_zh_CN.properties Sun Jul 5 10:17:59 2015 @@ -528,7 +528,6 @@ showjobstatus.Active=ææ showjobstatus.Processed=å·²å¤ç showjobstatus.RefreshStatus=å·æ°ç¶æå表 showjobstatus.Refresh=å·æ° -showjobstatus.PleaseTryAgainLater=ç»´æ¤ä¸ã请ç¨çã showjobstatus.StatusOfJobs=ä½ä¸ç¶æ showjobstatus.Notyetrun=è¿æªæ§è¡ @@ -575,7 +574,6 @@ documentstatus.ExecuteThisQuery=æ§è documentstatus.Continue=ä¸ä¸ä¸ª documentstatus.PleaseSelectAtLeastOneJob=è¯·éæ©è³å°ä¸ä¸ªä½ä¸ documentstatus.PleaseSelectaConnection=è¯·éæ©ä¸ä¸ªè¿æ¥ -documentstatus.PleaseTryAgainLater=ç»´æ¤ä¸ã请ç¨çã documentstatus.Previous=ä¸ä¸ä¸ª documentstatus.Next=ä¸ä¸ä¸ª documentstatus.Rows=è¡: @@ -620,7 +618,6 @@ queuestatus.ExecuteThisQuery=æ§è¡� queuestatus.Continue=ä¸ä¸ä¸ª queuestatus.PleaseSelectAtLeastOneJob=è¯·éæ©è³å°ä¸ä¸ªä½ä¸ queuestatus.PleaseSelectaConnection=è¯·éæ©ä¸ä¸ªè¿æ¥ -queuestatus.PleaseTryAgainLater=ç»´æ¤ä¸ã请ç¨çã queuestatus.DocumentsThatHaveNeverBeenProcessed=仿ªå¤çè¿çææ¡£ queuestatus.DocumentsProcessedAtLeastOnce=è³å°å¤çè¿ä¸æ¬¡çææ¡£ queuestatus.DocumentsOutOfScope=èå´ä¹å¤çææ¡£ @@ -696,7 +693,6 @@ simplereport.Next=ä¸ä¸ä¸ª simplereport.Rows=Rows: simplereport.RowsPerPage=è¡ï¼é¡µ: simplereport.PleaseSelectAConnection=è¯·éæ©è¿æ¥ -simplereport.PleaseTryAgainLater=ç»´æ¤ä¸ã请ç¨çã simplereport.EnterALegalNumberForRowsPerPage=请æ£ç¡®è¾å ¥æ¯é¡µçè¡æ° simplereport.EntityMatchMustBeAValidRegularExpression=å®ä½å¹é éä¸ºæææ£åè¡¨è¾¾å¼ simplereport.ResultCodeMatchMustBeAValidRegularExpression=ç»æä»£ç éä¸ºæææ£åè¡¨è¾¾å¼ @@ -738,7 +734,6 @@ maxactivityreport.Next=ä¸ä¸ä¸� maxactivityreport.Rows=Rows: maxactivityreport.RowsPerPage=è¡ï¼é¡µ: maxactivityreport.PleaseSelectAConnection=è¯·éæ©è¿æ¥ -maxactivityreport.PleaseTryAgainLater=ç»´æ¤ä¸ã请ç¨çã maxactivityreport.EnterALegalNumberForRowsPerPage=请æ£ç¡®è¾å ¥æ¯é¡µçè¡æ° maxactivityreport.EnterALegalIntervalSizeInMinutes=请æ£ç¡®è¾å ¥é´é(å) maxactivityreport.IdentifierClassDescriptionCannotBeEmpty=请è¾å ¥æ è¯ç¬¦ç±»è¯´æ @@ -784,7 +779,6 @@ maxbandwidthreport.NextPage=ä¸ä¸ maxbandwidthreport.Next=ä¸ä¸ä¸ª maxbandwidthreport.RowsPerPage=è¡ï¼é¡µ: maxbandwidthreport.PleaseSelectAConnection=è¯·éæ©è¿æ¥ -maxbandwidthreport.PleaseTryAgainLater=ç»´æ¤ä¸ã请ç¨çã maxbandwidthreport.HighestBandwidth2=æå¤§å¸¦å®½ maxbandwidthreport.Rows=è¡: maxbandwidthreport.Next=ä¸ä¸é¡µ @@ -830,7 +824,6 @@ resultreport.Next=ä¸ä¸ä¸ª resultreport.Rows=è¡: resultreport.RowsPerPage=è¡ï¼é¡µ: resultreport.PleaseSelectAConnection=è¯·éæ©è¿æ¥ -resultreport.PleaseTryAgainLater=ç»´æ¤ä¸ã请ç¨çã resultreport.IdentifierClass=æ è¯ç¬¦ç±» resultreport.ResultClass=ç»æç±» resultreport.EventCount=äºä»¶æ° @@ -850,6 +843,9 @@ error.Error=é误 error.Return=è¿å error.Unauthorized=Apache ManifoldCF: Unauthorized activity error.UnauthorizedAccess=You do not have permissions to perform this activity +error.ApacheManifoldCFMaintenanceUnderway=Apache ManifoldCF: Maintenance underway +error.MaintenanceUnderway=Maintenance underway +error.PleaseTryAgainLater=ç»´æ¤ä¸ã请ç¨çã viewjob.ApacheManifoldCFViewJob=Apache ManifoldCF: ä½ä¸ä¿¡æ¯ viewjob.ViewAJob=ä½ä¸ä¿¡æ¯
