keeleinstituut / tv-tolkevarav

Tõlkevärav (Translation Hub)
1 stars 0 forks source link

archived/deactivated user can't log in #708

Open plakitkelly opened 4 months ago

plakitkelly commented 4 months ago

Steps:

  1. User A is logged in
  2. User B is logged in (main user or user with archive/deactivate privilege)
  3. User B archive or deactivate user A
  4. User A refreshes the page
  5. User A is navigated to main page, sees error "Teadmata viga" and can't log in anymore

Refresh, hard refresh, re-open browser - doesn't work The only solution: delete the latest cookies

https://github.com/keeleinstituut/tv-tolkevarav/assets/130659408/70f98a25-e570-49c5-9cdd-46e75cf60664

Expected result: User should be able to log in without deleting the cookies, because the user maybe doesn't know what are the cookies and how to remove them.

MariusJulius commented 1 month ago

@plakitkelly Please retest.

plakitkelly commented 1 month ago

No more errors. @MariusJulius But when deactivating/archiving the user, user can still create new project, edit users, roles etc. (related to #740) And another thing: 1) User A is in 2 institutions, and logged in to X institution 2) User B deactivate/archive user A from X institution 3) User A is still logged in but when user A refreshes the page, user cannot change institution anymore. He is still in X institution where he was logged in, but can do actions that should no longer be possible. User has to log in again to be in the correct institution.

MariusJulius commented 4 days ago

@plakitkelly can you provide steps? Also what date did you set - as the earliest date is today (end of day)

plakitkelly commented 4 days ago
  1. Log in with user (A) who is in at least 2 institution
  2. User A logs in institution X
  3. User B (main user) deactivates the user A with current date or archives the user A in institution X
  4. User A refreshes the page
  5. After refresh the user A can't change the institution. "Vaheta asutust" disappears from dropdown menu image
  6. User A still can do some actions but he is archived/deactivated