mirror of
https://github.com/mjl-/mox.git
synced 2025-02-04 02:08:29 +03:00
web interfaces: when there is no login session, and a non-existent path is requested, mention the web interface this is about
may help users understand when /admin/ isn't enabled on a hostname but the account web interface is at /. the error will now say: no session for "account" web interface. it hopefully tells users that their request isn't going to an admin interface, but ends up at the account web interface. for issue #268
This commit is contained in:
parent
f15f2d68fc
commit
7647264a72
1 changed files with 1 additions and 1 deletions
|
@ -125,7 +125,7 @@ func Check(ctx context.Context, log mlog.Log, sessionAuth SessionAuth, kind stri
|
|||
// Cookies are named "webmailsession", "webaccountsession", "webadminsession".
|
||||
cookie, _ := r.Cookie(kind + "session")
|
||||
if cookie == nil {
|
||||
respondAuthError("user:noAuth", "no session")
|
||||
respondAuthError("user:noAuth", fmt.Sprintf("no session for %q web interface", strings.TrimPrefix(kind, "web")))
|
||||
return "", "", "", false
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue