django-loci
django-loci copied to clipboard
[bug] ObjectLocation admin doesn't work in readonly mode
When a user has only view permission, the map doesn't work because the JS fails (it was not tested in this scenario).
When a user has only view permission, the map doesn't work because the JS fails (it was not tested in this scenario).
I don't think it is due to the JS. If a user doesn't have change permissions, then these fields are not shown in ObjectLocation admin
I also found something in Django admin where we might found a possible fix :point_down: https://github.com/django/django/blob/cf79f92abee2ff5fd4fdcc1a124129a9773805b8/django/contrib/admin/options.py#L674
I also found something in Django admin where we might found a possible fix https://github.com/django/django/blob/cf79f92abee2ff5fd4fdcc1a124129a9773805b8/django/contrib/admin/options.py#L674
That only affects ModelAdmin and not InlineAdmin.
I created a simple demo project with our use case and also posted in django-users mailing list for help.
Also, django-leaflet does not render map for view only permissions: https://github.com/makinacorpus/django-leaflet/issues/85