peacecorps / medlink

A project to make it easier for Peace Corps Volunteers to order their medical supplies from a local Peace Corps Office. Volunteers can order by sms or webform. PC Staff interact with the orders in a simple to use dashboard.
https://www.youtube.com/watch?v=uNkwizhzMVA
Other
39 stars 36 forks source link

Flag for follow-up in "History Option" for a Vol leads to unauthorized page... even for admin #425

Closed choquette33 closed 8 years ago

choquette33 commented 9 years ago

When I clicked on the Flag for Follow up, in the https://pcmedlink.org/users/1/timeline page for an order by andrea roberts it kicked me to the https://pcmedlink.org/admin/users/new and told me I was not authorized to see the page, even though I was logged in as an admin.

jamesdabbs commented 9 years ago

This was quasi-deliberate: only a pcv can flag their own requests - https://github.com/PeaceCorps/medlink/blob/master/app/policies/response_policy.rb#L7.

The question is: should admins / PCMOs be able to flag them as well? Or should those buttons not be there if you're not able to flag them?

choquette33 commented 9 years ago

I can see a use case for having PCMO level user being able to flag an item. Mainly, because an medical unit would likely have one person charged with the responsibility to follow up with volunteers who did not receive a package - the Medical Secretary. However, others in a med unit -like one of the PCMOs- could find out something didn't make it to a volunteer and would could benefit from being able to flag it, so that the med secretary could follow up.

Therefore, I think a PCMO, and Admin should be able to mark things as flagged.