Skip to content

Commit

Permalink
Merge branch '2023.11' into 2024.11
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Jan 9, 2024
2 parents 035613b + 8e3e2c7 commit 8dceb85
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions tine20/Tinebase/Frontend/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,11 @@ protected function _getLoginSuccessResponse($username)
'jsonKey' => Tinebase_Core::get('jsonKey'),
'welcomeMessage' => "Welcome to Tine 2.0!"
);

try {
$response['assetHash'] = Tinebase_Frontend_Http_SinglePageApplication::getAssetHash();
} catch (Exception $e) {}

if (Tinebase_Core::get(Tinebase_Core::SESSION)->encourage_mfa) {
$response['encourage_mfa'] = true;
}
Expand Down
10 changes: 9 additions & 1 deletion tine20/Tinebase/js/LoginPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,12 +551,20 @@ Tine.Tinebase.LoginPanel = Ext.extend(Ext.Panel, {
},

onLoginSuccess: function(response) {
var responseData = Ext.util.JSON.decode(response.responseText);
const responseData = Ext.util.JSON.decode(response.responseText);
if (responseData.success === true) {
if (window.initialData?.afterLoginRedirect) {
return this.redirect(window.initialData.afterLoginRedirect);
}
Ext.MessageBox.wait(String.format(i18n._('Login successful. Loading {0}...'), Tine.title), i18n._('Please wait!'));

if (responseData?.assetHash && Tine.clientVersion.assetHash !== responseData.assetHash) {
Tine.Tinebase.common.reload({
keepRegistry: false,
clearCache: true
});
}

window.document.title = this.originalTitle;
response.responseData = responseData;
this.onLogin.call(this.scope, response);
Expand Down

0 comments on commit 8dceb85

Please sign in to comment.