Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

staging job fix for unattached file systems

fixed dependency issue in generated GMF code
fixed access denied page to prompt for login appropriately
  • Loading branch information...
commit a98cb0721dc27dc46d6040ff6b79845ea7b74362 1 parent 4f18640
@gregjan gregjan authored
View
1  crosswalk-gmf/model/crosswalk2-2.gmfgen
@@ -1443,7 +1443,6 @@
version="4.0.1.qualifier">
<requiredPlugins>org.eclipse.draw2d</requiredPlugins>
<requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
- <requiredPlugins>org.eclipse.gmf.runtime.tooling</requiredPlugins>
</plugin>
<editor/>
<navigator>
View
2  forms/src/main/java/cdr/forms/FormController.java
@@ -266,7 +266,7 @@ public ModelAndView handleForbidden(PermissionDeniedException e) {
ModelAndView modelview = new ModelAndView("403");
modelview.addObject("formId", e.getFormId());
modelview.addObject("form", e.getForm());
- modelview.addObject("message", e.getMessage()+"<br/><br/>Send email to "+this.getAdministratorEmail()+" to request access.");
+ modelview.addObject("message", e.getMessage()+" \nSend email to "+this.getAdministratorEmail()+" to request access.");
return modelview;
}
View
2  forms/src/main/webapp/WEB-INF/jsp/403.jsp
@@ -54,7 +54,7 @@
<div class="contentarea">
<h2><c:out value="${form.title}"/></h2>
<p><c:out value="${form.description}"/></p>
-<% if(session != null && session.getAttribute("user") != null) { %>
+<% if(request.getRemoteUser() != null) { %>
<h3>Not Authorized to Deposit</h3>
<p><c:out value="${message}"/></p>
<% } else { %>
View
35 workbench_plugin/src/main/java/unc/lib/cdr/workbench/stage/StagingJob.java
@@ -37,10 +37,10 @@
*/
public class StagingJob extends Job {
List<OriginalFileStore> toStage = null;
-
+
@Override
public boolean belongsTo(Object family) {
- if(stagingJobFamilyObject == family) {
+ if (stagingJobFamilyObject == family) {
return true;
}
return super.belongsTo(family);
@@ -67,24 +67,35 @@ protected IStatus run(IProgressMonitor monitor) {
monitor.setTaskName("Staging 1 of " + toStage.size());
int stageCount = 0;
Set<IProject> projects = new HashSet<IProject>();
+ Set<OriginalFileStore> skipped = new HashSet<OriginalFileStore>();
for (OriginalFileStore original : toStage) {
- if (monitor.isCanceled()) return Status.CANCEL_STATUS;
+ if (monitor.isCanceled())
+ return Status.CANCEL_STATUS;
monitor.setTaskName("Staging " + stageCount++ + " of " + toStage.size());
URI prestagedLocation = original.getPrestagedLocation();
try {
- if (prestagedLocation != null) {
- StagingUtils.prestage(original, prestagedLocation, new SubProgressMonitor(monitor, 100,
- SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
- } else {
- StagingUtils.stage(original,
- new SubProgressMonitor(monitor, 100, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
- }
- } catch(CoreException e) {
+ if (prestagedLocation != null) {
+ StagingUtils.prestage(original, prestagedLocation, new SubProgressMonitor(monitor, 100,
+ SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
+ } else {
+ if(original.isAttached()) {
+ StagingUtils.stage(original, new SubProgressMonitor(monitor, 100,
+ SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
+ } else {
+ skipped.add(original);
+ }
+ }
+ } catch (CoreException e) {
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Job could not finish", e);
}
}
monitor.done();
- return Status.OK_STATUS;
+
+ if(skipped.size() > 0) {
+ return new Status(IStatus.INFO, Activator.PLUGIN_ID, skipped.size()+ " original files cannot stage because they are not accessible.");
+ } else {
+ return Status.OK_STATUS;
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.