Skip to content
This repository was archived by the owner on Dec 28, 2022. It is now read-only.

Conversation

@stewue
Copy link
Member

@stewue stewue commented Nov 8, 2022

No description provided.

Changelog: make heartbeat interval independent of session timeout
Refs: TOCDEV-5313
@ghost
Copy link

ghost commented Nov 8, 2022

@codecov
Copy link

codecov bot commented Nov 8, 2022

Codecov Report

Merging #3191 (01a82a6) into master (4c780e7) will increase coverage by 0.08%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3191      +/-   ##
==========================================
+ Coverage   82.07%   82.15%   +0.08%     
==========================================
  Files         892      892              
  Lines       11173    11176       +3     
==========================================
+ Hits         9170     9182      +12     
+ Misses       2003     1994       -9     
Impacted Files Coverage Δ
packages/core/app-extensions/src/login/actions.js 100.00% <ø> (ø)
packages/core/app-extensions/src/login/login.js 50.00% <ø> (+16.66%) ⬆️
packages/core/app-extensions/src/login/sagas.js 0.00% <ø> (-66.67%) ⬇️
packages/apps/admin/src/modules/session/actions.js 100.00% <100.00%> (ø)
packages/apps/admin/src/modules/session/sagas.js 52.08% <100.00%> (+20.37%) ⬆️
...es/core/app-extensions/src/form/asyncValidation.js 100.00% <100.00%> (ø)
.../entity-browser/src/modules/entityBrowser/sagas.js 100.00% <100.00%> (+100.00%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

- only start heartbeat once and not after each login (which could lead to multiple heartbeats)
- move sessionCheck to entity-browser as in the admin setAdminAllowed and setLoggedIn are already handled and the notification socket is already opened. loggedIn is not reimplemented in the widgets as it is currently not used

Refs: TOCDEV-5313
if a field is focused and the invalid session modal is shown the focus is changed to the modal. This triggers the async validation. The server returns a 400 status code as the user is no longer logged in. This error should be ignored

Changelog: allow 400 status code in async validation
Refs: TOCDEV-5313
the LoadMask (loading the login and sso-login app) has a height of 100%. Without the div both load masks have the height of the modal itself. Layout in normal login screen is not changed

Changelog: fix layout of login in modal
Refs: TOCDEV-5313
the session invalid modal should have a higher z-index than all other modals and the toasters. so we cannot just reuse the functionality

Changelog: add invalid session modal
Refs: TOCDEV-5313
@stewue stewue force-pushed the pr/invalid-session branch from afbca1a to 2c4e490 Compare November 9, 2022 07:05
@stewue stewue requested a review from izzappel November 9, 2022 07:18
@izzappel
Copy link
Contributor

izzappel commented Nov 9, 2022

When logging in with a different user on the invalid session modal:

  • the username and business unit is not changing on the top right corner. Only after a manual page reload these data are correct again
  • when the user has a different language the UI shows both languages, the old and new

yield call(cache.clearAll)
}
yield put(actions.setAdminAllowed(adminAllowed))
yield put(actions.setLoggedIn(success))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So before we set adminAllowed before loggedIn. This caused that adminAllowed always had a value when Admin is rendered.
Now we set loggedIn separately and only set adminAllowed when we already render Admin component. This causes the prop types of Admin to be unhappy because adminAllowed prop is required.

I still try to understand all these changes.. nevertheless either the proptypes are not correct anymore or we need to be more careful with setting the loggedIn and adminAllowed values

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adminAllowed is set to undefined in the file packages/apps/admin/src/modules/session/sagas.js. So I think should the proptype was wrong

during the login the adminAllowed prop is set to undefined

Refs: TOCDEV-5313
@stewue stewue marked this pull request as draft November 9, 2022 15:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants