Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Wrong permissions for EmailNotificationForm #165

Open
wfehr opened this issue Jul 16, 2018 · 2 comments
Open

Wrong permissions for EmailNotificationForm #165

wfehr opened this issue Jul 16, 2018 · 2 comments

Comments

@wfehr
Copy link

wfehr commented Jul 16, 2018

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
Copy link
Author

wfehr commented Oct 1, 2018

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

@wfehr
Copy link
Author

wfehr commented Oct 1, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant