stalwartlabs / webadmin

Web-based admin for Stalwart Mail Server
https://stalw.art
71 stars 16 forks source link

[Enhancement] Properly redirect on base path and `/login` #9

Open dermalikmann opened 6 months ago

dermalikmann commented 6 months ago

On opening the page through its base path (e.g. "https://admin.mymail.server/") the user should be redirected depending if they are logged in.

Currently, on opening the base path, the user gets the login screen, even if logged in, which can be quite confusing. Additionally there should not be two different paths of logging into the website. Have one single login page, served through one single route.

Furthermore, /login should also handle a user that is already logged in, like it handles a user that has successfully logged in (redirecting to e.g. /manage/directory/accounts)