aldryn-forms icon indicating copy to clipboard operation
aldryn-forms copied to clipboard

Wrong permissions for EmailNotificationForm

Open wfehr opened this issue 6 years ago • 2 comments

The content_type_id for the EmailNotificationForm-Plugin is wrong. Currently the content_type_id for the EmailNotificationForm-Plugin is the same as for the FormPlugin-Plugin. From my db:

DB> select * from django_content_type where app_label in ('aldryn_forms', 'email_notifications'); +-----+---------------------+-----------------------------+ | id | app_label | model | +-----+---------------------+-----------------------------+ ... | 121 | aldryn_forms | formplugin | ... | 126 | email_notifications | emailnotification | | 127 | email_notifications | emailnotificationformplugin | +-----+---------------------+-----------------------------+

DB> select * from auth_permission where content_type_id=121; +-----+-------------------------------------------+-----------------+------------------------------------+ | id | name | content_type_id | codename | +-----+-------------------------------------------+-----------------+------------------------------------+ | 367 | Can add email notification form plugin | 121 | add_emailnotificationformplugin | | 349 | Can add form plugin | 121 | add_formplugin | | 368 | Can change email notification form plugin | 121 | change_emailnotificationformplugin | | 350 | Can change form plugin | 121 | change_formplugin | | 369 | Can delete email notification form plugin | 121 | delete_emailnotificationformplugin | | 351 | Can delete form plugin | 121 | delete_formplugin | +-----+-------------------------------------------+-----------------+------------------------------------+

DB> select * from auth_permission where content_type_id=127; Empty set (0.00 sec)

Installed:

  • django: 1.11.12
  • django-cms: 3.5.2
  • aldryn-forms: 3.0.3

wfehr avatar Jul 16 '18 09:07 wfehr

It seems like the above permissions error is a result of Djangos proxy-models, see related issue.

wfehr avatar Oct 01 '18 12:10 wfehr

Just saw pull-request #169, which might fix thix issue.

wfehr avatar Oct 01 '18 12:10 wfehr