﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32695	Create Permissions with create() instead of bulk_create() to send signal	BRISBOIS Laurent	BRISBOIS Laurent	"Hello there !

It seems Django is creating new Permission records in a post_migrate signal handler, especially in the method create_permissions which is called [https://github.com/django/django/blob/263ee4434fe814ee15ef231549273f16d7fad520/django/contrib/auth/apps.py#L20 here].

It would be great if it was possible to act on Permission creation. I mean by using create() instead of bulk_create(), pre_save() and post_save() signals would be sent and therefore it would be possible to, for instance, assign a Permission once it is created  with the post_save() signal.

I guess the only think to do would be to change [https://github.com/django/django/blob/263ee4434fe814ee15ef231549273f16d7fad520/django/contrib/auth/management/__init__.py#L83 this line].

I could even do it if you say it will be accepted.

Otherwise how could it be possible to achieve it ? I mean assign a Permission once it is created..?

Kind regards,

A Django Lover."	Cleanup/optimization	closed	contrib.auth	3.2	Normal	wontfix			Unreviewed	1	0	0	0	1	0
