-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
Make projects available for users which are part of a team. Users that are part of a team will see more projects in the app than "normal" users, if there are specific team projects set. Whereas it is most desirable that MapSwipe projects are open for everyone to map, some organisations have requested this option, e.g. to engage volunteers in bigger MapSwipeathons or for targeted and potentially paid mapping campaigns.
This requires several additions from the back end side:
Firebase
- adjust firebase database rules
- users can read their team id, but can't overwrite it
- only project managers can write team attributes in firebase
- users can read
teamName
, but not other attributes such asteamToken
- write tests for firebase rules
- add new data endpoint for teams at
v2/teams/teamId
- data structure:
{ "teamName": "Benni's Super Swipers", "teamToken": "ab234ef449ccb98e7a" }
User / Team Management
- write function to set up a team using the mapswipe_workers cli team-management
- input: team name
- teamToken will be generated, e.g. such as a UUID using this lib
- write a function to renew token of a team in mapswipe_workers cli team-management
- write function to delete a team in mapswipe_workers cli team-management
- write function to add user to a team with given id using the mapswipe_workers cli
- write function to remove all users to a give team using the mapswipe_workers cli
- add basic tests:
- create a team, then delete it. There should be nothing left
- create a team, make sure the data is there, and the UUID has the format you expect
- create a team, update the team token, make sure the new token is not the same as the original one
Project Creation
- adjust project creation in manager dashboard
- add team id to project
- check for teamId in projectDraft during project creation and set status accordingly
- set status for private projects after creation to
private_inactive
- set status for private projects after creation to
Project Management
- show all users of a team in manager dashboard
- show that projects are private in manager dashboard project overview page
- make sure that you can set a private project not to public by accident, valid status attributes for private projects
private_active
,private_finished
,private_inactive
Metadata
Metadata
Assignees
Labels
No labels