Skip to content

Conversation

@dee077
Copy link
Member

@dee077 dee077 commented Nov 12, 2025

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #1157.

Description of Changes

  • Made a new ws endpoint location/all from base django-loci clases with updated user permissions.

Screen Recording

Screencast.from.2025-11-13.02-20-06.webm

dee077 and others added 3 commits November 12, 2025 00:59
Implemented API to return indoor coordinates of devices for a given location.

Closes #828

---------

Co-authored-by: Gagan Deep <[email protected]>
Implemented a new websocket endpoint 'location/all/' with updated user permission from base clases from django-loci.

Fixes #1157
@coveralls
Copy link

Coverage Status

coverage: 98.549% (-0.06%) from 98.607%
when pulling 5a91a30 on feature/1157-new-ws-endpoint-for-all-location
into faec934 on master.

@dee077 dee077 self-assigned this Dec 3, 2025
@dee077 dee077 added the gsoc Part of a Google Summer of Code project label Dec 3, 2025
netjsonconfig @ https://github.com/openwisp/netjsonconfig/archive/refs/heads/1.3.tar.gz
django-x509 @ https://github.com/openwisp/django-x509/archive/refs/heads/1.4.tar.gz
django-loci @ https://github.com/openwisp/django-loci/archive/refs/heads/1.3.tar.gz
django-loci @ https://github.com/openwisp/django-loci/tarball/feature/191-new-ws-endpoint-for-all-location
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Remove before merging

Comment on lines +27 to +33
if (
result
and not user.is_superuser
and not user.is_manager(location.organization)
):
return False
return result
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (
result
and not user.is_superuser
and not user.is_manager(location.organization)
):
return False
return result
return result and (user.is_superuser or user.is_manager(location.organization))

Comment on lines +44 to +48
path(
"api/v1/controller/location/<uuid:pk>/indoor-coordinates/",
geo_views.indoor_coordinates_list,
name="indoor_coordinates_list",
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this part of the current PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gsoc Part of a Google Summer of Code project

Projects

Development

Successfully merging this pull request may close these issues.

[feature] New ws endpoint for all all Location broadcast

4 participants