Skip to content

Commit

Permalink
added ALLOW_HISTORY_SHARE to demo context.xml and minor improvements …
Browse files Browse the repository at this point in the history
…on history share endpoint
  • Loading branch information
FreakyBytes committed Jan 20, 2017
1 parent 9ad3b56 commit dde0160
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ public Response setWorkspaceHistory( @CookieParam(Fields.COOKIE_PATH) String old
}

// user stuff
// sets first workspace as active one
// current active workspace does not get changed
UserManager user = null;
try {
user = new UserManager( historyList[0] );
user = new UserManager( oldUserPath );
} catch (IOException e) {
LOGGER.error(e, "Cannot create user");
return buildErrorResponse(500, null, "user not creatable!", e.getMessage() );
Expand Down Expand Up @@ -215,10 +215,6 @@ public Response setWorkspaceHistory( @CookieParam(Fields.COOKIE_PATH) String old
}
}

// set first history entry as current
history.setCurrentWorkspace( user.getWorkspaceId() );
LOGGER.info("Set current workspace id to ", user.getWorkspaceId(), " from ", oldUserPath);

if( oldUserPath != null && !oldUserPath.isEmpty() && history.containsWorkspace( oldUserPath ) == false ) {
Workspace workspace = WorkspaceManager.getInstance().getWorkspace(oldUserPath);
if( workspace != null ) {
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/CombineArchiveWeb.example.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
<Parameter name="STATS_PUBLIC" value="true" override="false" />
<!-- Set a secret to access full stats by adding an url parameter, even if the stats are disabled. Leave blank to disable this feature -->
<Parameter name="STATS_SECRET" value="" override="false" />
<!-- allows to share the entire workspace history, this does not effect the UI, but enables the /share/history endpoint,
which is used by the migration PHP script. Disabled by default. -->
<Parameter name="ALLOW_SHARING_HISTORY" value="false" override="false" />

<!-- Quotas -->

Expand Down

0 comments on commit dde0160

Please sign in to comment.