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

Multiple users reporting for same moth trap #114

Open
larspett opened this issue Oct 11, 2023 · 4 comments
Open

Multiple users reporting for same moth trap #114

larspett opened this issue Oct 11, 2023 · 4 comments

Comments

@larspett
Copy link

Similar to how butterfly transects are unique, there is a need to implement standardised, unique trap sites for moth traps within ButterflyCount. This would allow moth trap sites to be handled by more than one person. We are a team taking care of the two Ecology Building moth traps and would want to allow multiple persons to upload data from these two traps. Not having this option will flood the system with multiple sites that are really the same ones once the system starts to be used for systematic moth monitoring (which will happen next year, most likely).

@kazlauskis
Copy link
Member

@larspett could these traps be public or do you want to restrict who can see a shared trap?

@johnvanbreda the app uses /services/rest/locations?location_type_id=18879 endpoint to fetch user moth trap locations. Could we enable shared/public locations? I think there was a public=true request param, no? Or maybe I could use an anonymous user token to fetch locations that are public.

@johnvanbreda
Copy link

@kazlauskis the request generates the following SQL in the WHERE part of the query:

WHERE t1.deleted=false 
AND ((t2.website_id=2 AND t1.created_by_id=3) OR t1.public=true) 
AND t1.location_type_id=18879

So the logic is currently to fetch all location of that type if they are public or if they are created by the logged in user and linked to the website.

@kazlauskis
Copy link
Member

In that case, is it a matter of setting public=true when creating a moth trap location? I assume the public is a system attribute that can be set.

@larspett
Copy link
Author

larspett commented Oct 13, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants