fix(auth): update user grants before check (#5406)

This commit is contained in:
Silvan
2023-03-13 08:03:49 +01:00
committed by GitHub
parent 0c704966a2
commit eb4f7c5d7c
10 changed files with 23 additions and 17 deletions

View File

@@ -1471,10 +1471,8 @@ func projectRequired(ctx context.Context, request *domain.AuthRequest, projectPr
}
_, err = projectProvider.OrgProjectMappingByIDs(request.UserOrgID, project.ID, request.InstanceID)
if errors.IsNotFound(err) {
// if not found there is no error returned
return true, nil
}
if err != nil {
return false, err
}
return false, nil
return false, err
}