aboutsummaryrefslogtreecommitdiffstats
path: root/services/auth/source/db/authenticate.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/auth/source/db/authenticate.go')
-rw-r--r--services/auth/source/db/authenticate.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/auth/source/db/authenticate.go b/services/auth/source/db/authenticate.go
index ec89984499..76445e0d6d 100644
--- a/services/auth/source/db/authenticate.go
+++ b/services/auth/source/db/authenticate.go
@@ -40,5 +40,13 @@ func Authenticate(user *user_model.User, login, password string) (*user_model.Us
}
}
+ // attempting to login as a non-user account
+ if user.Type != user_model.UserTypeIndividual {
+ return nil, user_model.ErrUserProhibitLogin{
+ UID: user.ID,
+ Name: user.Name,
+ }
+ }
+
return user, nil
}