Skip to content

Commit 8299845

Browse files
Merge pull request #7676 from kkthxbye-code/develop
Fix #7399: LDAP excessive CPU usage when AUTH_LDAP_FIND_GROUP_PERMS is enabled
2 parents 9ae5865 + 830cf4b commit 8299845

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netbox/netbox/authentication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def get_object_permissions(self, user_obj):
3434
object_permissions = ObjectPermission.objects.filter(
3535
self.get_permission_filter(user_obj),
3636
enabled=True
37-
).prefetch_related('object_types')
37+
).order_by('id').distinct('id').prefetch_related('object_types')
3838

3939
# Create a dictionary mapping permissions to their constraints
4040
perms = defaultdict(list)

0 commit comments

Comments
 (0)