fix: 修复用户API权限

pull/7942/head
Jiangjie.Bai 3 years ago committed by Jiangjie.Bai
parent 5cc2fdae4f
commit 9e5c132485

@ -108,6 +108,9 @@ class UserViewSet(CommonApiMixin, UserQuerysetMixin, SuggestionMixin, BulkModelV
self.check_object_permissions(self.request, user)
return super().perform_bulk_update(serializer)
def allow_bulk_destroy(self, qs, filtered):
return qs.count() != filtered.count()
def perform_bulk_destroy(self, objects):
for obj in objects:
self.check_object_permissions(self.request, obj)

Loading…
Cancel
Save