You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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.
The text was updated successfully, but these errors were encountered:
I tried to work-around this issue by manually creating change_override_url_urlnode permissions for all my page models. Now staff accounts can create pages. But they are still unable to edit the override_url field on existing pages, even though they have the permission.
I traced this down to the fact that django-fluent-pages is doing an object level permissions check, which as far as I know will always return exactly zero permissions, unless some additional package package (e.g. django-guardian) is configured to handle object level permissions.
Here, we are doing an object level permissions check:
Seems like django-fluent-pages should only be doing an object level permissions check if it knows object level permissions are configured and safe to use?
On further investigation of object level permissions. I can't imagine it's even a useful thing to check object permissions for these two permissions at all? If I understand correctly, even though we give the user permission to change the override URL field for all our page models, we will also need to explicitly assign the same permission to every single user and every single page instance?
I think django-fluent-pages should not check object permissions in these two methods. Perhaps not anywhere, and certainly not when it isn't sure there is a compatible implementation of object permissions in use?
django-fluent-pages/fluent_pages/adminui/urlnodechildadmin.py
Lines 187 to 201 in f079fd9
These checks are triggered on page types (polymorphic child models) where
self.opts.app_label
is something other thanfluent_pages
. But the permissions are only created forUrlNode
model (which belongs tofluent_pages
app).django-fluent-pages/fluent_pages/models/db.py
Lines 117 to 120 in f079fd9
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.The text was updated successfully, but these errors were encountered: