Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] ObjectLocation admin doesn't work in readonly mode #95

Open
nemesifier opened this issue Oct 8, 2021 · 2 comments
Open

[bug] ObjectLocation admin doesn't work in readonly mode #95

nemesifier opened this issue Oct 8, 2021 · 2 comments

Comments

@nemesifier
Copy link
Member

When a user has only view permission, the map doesn't work because the JS fails (it was not tested in this scenario).

@devkapilbansal
Copy link
Member

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 👇
https://github.com/django/django/blob/cf79f92abee2ff5fd4fdcc1a124129a9773805b8/django/contrib/admin/options.py#L674

@pandafy
Copy link
Member

pandafy commented Jan 3, 2022

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: makinacorpus/django-leaflet#85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do (Python & Django)
Development

No branches or pull requests

3 participants