Skip to content

Commit

Permalink
FIX: Hide texts in work list when accessing from another hostname (Hy…
Browse files Browse the repository at this point in the history
  • Loading branch information
franck-eyraud committed Mar 5, 2018
1 parent 7ad32e3 commit 1e44290
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion couchdb/lib/traduxio.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,11 @@ if (typeof req != "undefined" && req!=null) {
if (Traduxio.config["multi-tenant"] && Traduxio.req.headers && Traduxio.req.headers["Host"]) {
var tenant=Traduxio.req.headers["Host"].split(":");
tenant=tenant[0];
if (tenant!=Traduxio.config["defaul-tenant"]) {
if (tenant!=Traduxio.config["default-tenant"]) {
Traduxio.req.tenant=tenant;
log("for this request, tenant is "+tenant);
} else {
log("for this request tenant is default "+Traduxio.config["default-tenant"]);
}
}
}
3 changes: 2 additions & 1 deletion couchdb/views/works/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ function (o) {
title:o.title,
original:o.text?true:false,
languages: languages,
privileges: o.privileges
privileges: o.privileges,
translations: true
});
}
}

0 comments on commit 1e44290

Please sign in to comment.