diff --git a/api/tacticalrmm/ee/sso/permissions.py b/api/tacticalrmm/ee/sso/permissions.py index 3b31318a..c98f7733 100644 --- a/api/tacticalrmm/ee/sso/permissions.py +++ b/api/tacticalrmm/ee/sso/permissions.py @@ -10,5 +10,4 @@ from allauth.socialaccount.models import SocialAccount class SSOLoginPerms(permissions.BasePermission): def has_permission(self, r, view): - connected_apps = SocialAccount.objects.filter(user=r.user) - return len(connected_apps) > 0 + return SocialAccount.objects.filter(user=r.user).exists()