1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-09 02:05:59 +01:00

Remove obsolete ErrAnonymousNotAuthorised.

This commit is contained in:
Juliusz Chroboczek 2024-05-11 13:39:50 +02:00
parent 969354e9e5
commit 4eaf6d058a
2 changed files with 0 additions and 5 deletions

View file

@ -40,9 +40,6 @@ func (err *NotAuthorisedError) Unwrap() error {
return err.err
}
var ErrAnonymousNotAuthorised = &NotAuthorisedError{
err: errors.New("anonymous users not authorised in this group"),
}
var ErrDuplicateUsername = &NotAuthorisedError{
errors.New("this username is taken"),
}

View file

@ -1426,8 +1426,6 @@ func handleClientMessage(c *webClient, m clientMessage) error {
var autherr *group.NotAuthorisedError
if errors.Is(err, os.ErrNotExist) {
s = "group does not exist"
} else if errors.Is(err, group.ErrAnonymousNotAuthorised) {
s = "please choose a username"
} else if errors.Is(err, token.ErrUsernameRequired) {
s = err.Error()
e = "need-username"