Skip to content
Snippets Groups Projects
Verified Commit 6b3663a6 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

Merge branch 'dev' into f-versioning

parents 6b332205 6e8b8efe
Branches
Tags
No related merge requests found
......@@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Script for moving files (change their path) in the internal file system based
on a two-column tsv file (with columns "from" and "to"). See
[README.md](misc/move_files/README.md).
- LDAP server may now be given and may be different from LDAP domain. See
`misc/pam_authentication/ldap.conf`
### Changed
......
# This file is sourced by the LDAP authentication script
# Set the ldap server here. This is also used to generate a fully qualified
# user name: <USER>@$LDAP_SERVER
# Set the ldap server here.
# LDAP_SERVER="example.com"
# Set the ldap domain here. This is used to generate a fully qualified
# user name: <USER>@$LDAP_DOMAIN
# LDAP_DOMAIN="example.com"
......@@ -35,7 +35,7 @@ exe_dir=$(dirname $0)
# If the second argument is empty or "-", take password from stdin, else use the argument as a file.
testpw() {
username="${1}@${LDAP_SERVER}"
username="${1}@${LDAP_DOMAIN}"
pwfile="$2"
pwargs=("-w" "$pwfile")
if [[ $pwfile == "-" ]] ; then
......
......@@ -71,7 +71,12 @@ public class SharedFileResource extends AbstractCaosDBServerResource {
final MediaType mt = MediaType.valueOf(FileUtils.getMimeType(file));
final FileRepresentation ret = new FileRepresentation(file, mt);
ret.setDisposition(new Disposition(Disposition.TYPE_ATTACHMENT));
// HTML files should be opened in the browser.
// Any other media type than HTML is attached for download.
if (!MediaType.TEXT_HTML.includes(mt)) {
ret.setDisposition(new Disposition(Disposition.TYPE_ATTACHMENT));
}
return ret;
}
......
......@@ -131,7 +131,7 @@ public class ServerMessages {
new Message(
MessageType.Error,
0,
"Cannot parse value to boolean (either 'true' or 'false, ignoring case).");
"Cannot parse value to boolean (either 'true' or 'false', ignoring case).");
public static final Message NOT_PERMITTED = new Message(MessageType.Error, 0, "Not permitted.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment