Form widget and field.
Simple child of forms.ModelMultipleChoiceField which pre-sets queryset=Permission.objects.all(). It’s an optionnal item here for your convenience.
alias of PermissionSelectMultipleWidget
Settings for permissions_widget.
Patch User and/or Group admin form to use the permission widget depending on settings.
The patch works like this: