Skip to content

Commit

Permalink
fix(Besoins): Admin : restreindre la liste des admins affichés (bizde…
Browse files Browse the repository at this point in the history
…v only). ref #1242
  • Loading branch information
raphodn committed Jun 5, 2024
1 parent ac3de01 commit a58e122
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lemarche/users/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def get_search_results(self, request, queryset, search_term):
queryset, use_distinct = super().get_search_results(request, queryset, search_term)
pattern = r"^\/admin\/autocomplete\/\?.*app_label=tenders&model_name=tender&field_name=admins$"
if re.search(pattern, request.get_full_path()):
queryset = queryset.filter(kind=User.KIND_ADMIN)
queryset = queryset.is_admin_bizdev()
return queryset, use_distinct

def save_formset(self, request, form, formset, change):
Expand Down

0 comments on commit a58e122

Please sign in to comment.