Skip to content

Feature: Intercept style.json request in Django and filter data according to user (project / rights) #111

@arnaudfnr

Description

@arnaudfnr

Objective

The goal is to display different data on the map based on the user that is logged in.
The website will handle form data uploaded y different actors from different associations.
Globally, there are 3 kinds of forms.
Locally, there will be several projects using the same forms to monitor biodiversity indicators.
When a user from project ABC logged into the website, only data from project ABC is displayed on the map.
When a user with admin rights logs into the website, all data is displayed on the map
When a user is not logged in , only public data will be shown (still unclear what will be public / private)

Context

Before creating the map, the frontend sens a request to the backend to retrieve the style.json using this endpoint : api/maps/style.json (view is my_map_view in maps.
The django backend directly sends this request to coordo using handleRequest method and the return the data as is.
The goal of this ticket is to add a fitlering step before returning the Json response, to filter the sources with data only from the project in which the user participates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Ready to dev

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions