1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-09 18:25:58 +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 return err.err
} }
var ErrAnonymousNotAuthorised = &NotAuthorisedError{
err: errors.New("anonymous users not authorised in this group"),
}
var ErrDuplicateUsername = &NotAuthorisedError{ var ErrDuplicateUsername = &NotAuthorisedError{
errors.New("this username is taken"), errors.New("this username is taken"),
} }

View file

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