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

Schema - partner agencies should be able to access an agency's data #86

Open
am-MongoDB opened this issue Jul 10, 2020 · 4 comments
Open
Labels
enhancement New feature or request
Milestone

Comments

@am-MongoDB
Copy link
Collaborator

am-MongoDB commented Jul 10, 2020

Use the partnerAgencies attribute in an Agency document to indicate which other agencies this agency grants permission to read their boarding reports.

An Agency document should be able to contain an array of sub-documents containing a partner agency name and (optionally) a start and/or end date.

These attributes should be checked by the rule that controls whether a user can read a BoardingReports document.

@am-MongoDB am-MongoDB self-assigned this Jul 10, 2020
@am-MongoDB am-MongoDB added the enhancement New feature or request label Jul 10, 2020
@am-MongoDB am-MongoDB added this to Backlog in WildAid O-FISH Realm Development via automation Jul 10, 2020
@am-MongoDB am-MongoDB moved this from Backlog to To do in WildAid O-FISH Realm Development Jul 10, 2020
@am-MongoDB
Copy link
Collaborator Author

@Sheeri Need to understand the functionality behind this - e.g., can all members of the partner agency see all attributes of all of the agency's reports

@am-MongoDB am-MongoDB moved this from To do to Waiting on requirements in WildAid O-FISH Realm Development Jul 10, 2020
@Sheeri
Copy link
Collaborator

Sheeri commented Jul 30, 2020

Yes, a partner org would see a partner's boarding report information as if it was their own. They cannot modify users or user groups in the partner agency.

@am-MongoDB am-MongoDB added this to the later milestone Sep 15, 2020
@Sheeri Sheeri changed the title Rules - partner agencies should be able to access an agency's data Schema - partner agencies should be able to access an agency's data Sep 25, 2020
@Sheeri
Copy link
Collaborator

Sheeri commented Sep 25, 2020

The way this works is - once a global administrator verifies that data sharing is allowed (there are contracts that need to be signed and filed), that global administrator can go into the sharing org's profile and mark that it will share data with another agency.

Note that the MVP for this is just sharing the whole boarding record. The design and video show a more granular functionality. The schema change should be designed with an eye to adding that in later on. (though I think partnerAgencies as an array of subdocuments with agency_name and sharing dates will work, we can add more to the array of subdocuments later).

The design also shows segmentation by date, which should also be in the MVP. Once the data is shared, it cannot be un-shared - it can be stopped, but the partner agency should still be able to see the other data.

The partnerAgencies and date fields cover what the global administrator does in this video: (again, ignore the more granular field-level permissions, that's for later):
https://www.awesomescreenshot.com/video/1094782?key=c14f27874b3cf532f09d806b1bf664df

The feature depends on only sharing the data with anyone in the agency administrator role by default. If the Agency Administrators want the field officers to see the data, they have to set that, as per this video:
https://www.awesomescreenshot.com/video/1094843?key=46506494ff04643e33277fe1090816b9

Again, for this MVP, we are only going for the whole record itself, not any particular fields. I don't know if the feature that a field officer can only see their own records is something that dovetails nicely with this schema change, so if it does not, it's OK to consider this closed even if that's not done.

In an ideal world, this would apply to what is seen on the mobile app too, but I believe that's not currently possible as we partition on agency. It's OK that it's not in the mobile app for the MVP of this issue.

@am-MongoDB am-MongoDB moved this from Waiting on requirements to To do in WildAid O-FISH Realm Development Sep 25, 2020
@o-fish-wildaid
Copy link
Contributor

@Sheeri Sheeri modified the milestones: later, v30 10/6 Sep 30, 2020
@am-MongoDB am-MongoDB moved this from To do to In progress in WildAid O-FISH Realm Development Sep 30, 2020
@am-MongoDB am-MongoDB removed their assignment Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

3 participants