django-cms / django-filer

File and Image Management Application for django
https://django-filer.readthedocs.io/
Other
1.73k stars 575 forks source link

[bug] Unable to use v2.2 when group admin is disabled #1291

Closed petrklus closed 1 year ago

petrklus commented 2 years ago

A project where group management is disabled, for example via:

admin.site.unregister(Group)

Is unable to use Filer, as the PermissionAdmin now contains a reference to 'group' under autocomplete_fields:

https://github.com/django-cms/django-filer/blob/master/filer/admin/permissionadmin.py#L16

Suggestions?

marksweb commented 2 years ago

@petrklus As it stands, django's groups are a requirement of the project due to this admin class getting loaded by default.

There is a config option for permissions; https://django-filer.readthedocs.io/en/latest/permissions.html#permissions

Perhaps there should be checks in place for the FILER_ENABLE_PERMISSIONS setting to optionally import the permissions side of the app so that you can use it in a configuration such as yours.

FinemechanicPub commented 1 year ago

I have a similar issue. I'm using my own group class inherited from Group and it has a different name, so django-filer stops with the error stating that the Group model is not registered.

linhvng commented 1 year ago

I have a similar issue. I'm using my own group class inherited from Group and it has a different name, so django-filer stops with the error stating that the Group model is not registered.

I have the same issue as well

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This will now be closed due to inactivity, but feel free to reopen it.