Refactor CheckLoginPermission() code

This commit is contained in:
Yang Luo
2023-09-15 02:47:53 +08:00
parent b633ecdcf2
commit 616629ef99
3 changed files with 50 additions and 36 deletions

View File

@ -59,7 +59,7 @@ func tokenToResponse(token *object.Token) *Response {
func (c *ApiController) HandleLoggedIn(application *object.Application, user *object.User, form *form.AuthForm) (resp *Response) {
userId := user.GetId()
allowed, err := object.CheckAccessPermission(userId, application)
allowed, err := object.CheckLoginPermission(userId, application)
if err != nil {
c.ResponseError(err.Error(), nil)
return