Fix: exclude admin perms from frontend

This commit is contained in:
shamoon 2024-04-13 19:57:20 -07:00
parent f812f2af4d
commit 7281c110c6

View File

@ -27,7 +27,7 @@ class UserSerializer(serializers.ModelSerializer):
password = ObfuscatedUserPasswordField(required=False)
user_permissions = serializers.SlugRelatedField(
many=True,
queryset=Permission.objects.all(),
queryset=Permission.objects.exclude(content_type__app_label="admin"),
slug_field="codename",
required=False,
)