+ Fix web entry login bloqued when session_block configuration is enabled.
+ Include behat test.
This commit is contained in:
davidcallizaya
2017-07-04 16:51:24 -04:00
parent 966c2890fe
commit cb80a42125
16 changed files with 4256 additions and 261 deletions

View File

@@ -210,7 +210,7 @@ $webEntryModel = \WebEntryPeer::retrieveByPK($weUid);
if (localStorage.weData) {
try {
weData = JSON.parse(localStorage.weData);
if (weData.TAS_UID!==tasUid) {
if (weData.TAS_UID!==tasUid || !weData.APPLICATION || !weData.INDEX) {
//TAS_UID is different, reset.
resetLocalData();
}
@@ -265,7 +265,7 @@ $webEntryModel = \WebEntryPeer::retrieveByPK($weUid);
return new Promise(function (logged, failure) {
if (!isLogged) {
log("login");
open('../login/login?u=' + encodeURIComponent(location.pathname + '/../../webentry/logged'))
open('../login/login?inIFrame=1&u=' + encodeURIComponent(location.pathname + '/../../webentry/logged'))
.then(function (userInformation) {
logged(userInformation);
})
@@ -411,7 +411,7 @@ $webEntryModel = \WebEntryPeer::retrieveByPK($weUid);
//This code is to prevent error at back history
//in Firefox
$("#iframe").hide();
$("#iframe").attr("src", "../login/login");
$("#iframe").attr("src", "../login/login?inIFrame=1");
logout(false, function() {
resolve(callbackUrl);
});

View File

@@ -534,6 +534,12 @@ class WebEntryEvent
unset($arrayData["PRJ_UID"]);
unset($arrayData["WEE_WE_UID"]);
unset($arrayData["WEE_WE_TAS_UID"]);
if (empty($arrayData["WE_LINK_SKIN"])) {
unset($arrayData["WE_LINK_SKIN"]);
}
if (empty($arrayData["WE_LINK_LANGUAGE"])) {
unset($arrayData["WE_LINK_LANGUAGE"]);
}
if (!isset($arrayData["WEE_DESCRIPTION"])) {
$arrayData["WEE_DESCRIPTION"] = "";
@@ -678,7 +684,8 @@ class WebEntryEvent
$task = new \Tasks();
//Task - Step for WE_TYPE=SINGLE
if (isset($arrayData["DYN_UID"]) && $arrayData["DYN_UID"] != $arrayWebEntryEventData["DYN_UID"] && $arrayData["WE_TYPE"]==='SINGLE') {
if (isset($arrayData["DYN_UID"]) && $arrayData["DYN_UID"] != $arrayWebEntryEventData["DYN_UID"] &&
((isset($arrayData["WE_TYPE"]) && $arrayData["WE_TYPE"]==='SINGLE') || ($arrayWebEntryEventData["WE_TYPE"]==='SINGLE'))) {
//Delete
$step = new \Step();

View File

@@ -27,7 +27,7 @@ SELECT LANG_ID, LANG_NAME FROM langOptions
<JS type="javascript"><![CDATA[
//validate iframe login
if(inIframe()) {
if(inIframe() && (window.location.search.indexOf("inIFrame=1")===-1)) {
if (PM.Sessions.getCookie('PM-TabPrimary') !== '101010010'
&& (window.location.pathname.indexOf("login/login") !== -1
|| window.location.pathname.indexOf("sysLogin") !== -1)) {

View File

@@ -30,7 +30,7 @@ SELECT LANG_ID, LANG_NAME FROM langOptions
<JS type="javascript"><![CDATA[
//validate iframe login
if(inIframe()) {
if(inIframe() && (window.location.search.indexOf("inIFrame=1")===-1)) {
if (PM.Sessions.getCookie('PM-TabPrimary') !== '101010010'
&& (window.location.pathname.indexOf("login/login") !== -1
|| window.location.pathname.indexOf("sysLogin") !== -1)) {