-
Notifications
You must be signed in to change notification settings - Fork 24
Description
django-fluent-pages/fluent_pages/adminui/urlnodechildadmin.py
Lines 187 to 201 in f079fd9
| def has_change_shared_fields_permission(self, request, obj=None): | |
| """ | |
| Whether the user can change the page layout. | |
| """ | |
| opts = self.opts | |
| codename = '{0}.change_shared_fields_urlnode'.format(opts.app_label) | |
| return request.user.has_perm(codename, obj=obj) | |
| def has_change_override_url_permission(self, request, obj=None): | |
| """ | |
| Whether the user can change the page layout. | |
| """ | |
| opts = self.opts | |
| codename = '{0}.change_override_url_urlnode'.format(opts.app_label) | |
| return request.user.has_perm(codename, obj=obj) |
These checks are triggered on page types (polymorphic child models) where self.opts.app_label is something other than fluent_pages. But the permissions are only created for UrlNode model (which belongs to fluent_pages app).
django-fluent-pages/fluent_pages/models/db.py
Lines 117 to 120 in f079fd9
| permissions = ( | |
| ('change_shared_fields_urlnode', _("Can change Shared fields")), # The fields shared between languages. | |
| ('change_override_url_urlnode', _("Can change Override URL field")), # Fpr overriding URLs (e.g. '/' for homepage). | |
| ) |
It looks like this has been the case for a long long time. I can only guess that it has never been noticed because everyone is using superuser accounts (which have all permissions, even permissions that don't exist).
Or perhaps another more recent change has only recently surfaced the issue. When I try to create a page with a staff account, I am told to fix the errors below (but there are none). I assume the error is that the read only override_url field is (None) instead of an empty string, and because it's read only, no field is shown.