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

"Carpool Details Link" from admin tool #613

Open
jillh510 opened this issue Aug 20, 2018 · 13 comments
Open

"Carpool Details Link" from admin tool #613

jillh510 opened this issue Aug 20, 2018 · 13 comments

Comments

@jillh510
Copy link
Contributor

When an admin goes from the Carpools dashboard at https://nomad.ragtag.org/admin/carpools to details for a specific carpool, the emails and names of driver and passengers should be displayed.

It's OK if we need to add a URL param to the carpool details page to indicate that the referrer is the admin dashboard, so long as the carpools detail page itself checks that the viewer has admin permissions before displaying info about the driver and passengers. (yeah, someone could guess the URL param, but if they don't have admin rights, they wouldn't see sensitive info anyway).

@iandees
Copy link
Member

iandees commented Aug 20, 2018

It should be based entirely on checking for the logged in user's role, not a request param.

Can we imagine showing more information for a carpool that we want to add to an admin-specific view onto a carpool? If it was admin specific then we could make the generic carpool view less complicated and error-prone.

@jillh510
Copy link
Contributor Author

In an ideal world, the admin's view of a carpool would include driver's name/email, approved passengers' names/emails, and pending passengers' names/emails, plus would allow the admin to do anything the driver can do (approve or deny passengers, change the number of seats, edit the carpool, cancel the carpool). Use case: the driver has made mistakes and can't figure out how to fix them.

@jillh510
Copy link
Contributor Author

I might prefer a separate "administer carpool" view that doesn't piggyback on the "carpool details" page that ordinary users see.

@jillh510
Copy link
Contributor Author

How about I think this through rather than pitching ideas into a bug?

@jillh510 jillh510 self-assigned this Aug 20, 2018
@iandees
Copy link
Member

iandees commented Aug 20, 2018

😄 thinking through ideas is totally ok. Then others can offer their thoughts too.

@jillh510
Copy link
Contributor Author

@dryan had a different idea that would also solve the problem: allowing admins to impersonate users (Jane Admin can "become" Joe User, and then can edit Joe's carpools/rides in case Joe has troubles). If Flask supports this, it would do the trick.

@jillh510
Copy link
Contributor Author

Sending to Dan for a verdict on impersonation. If it's not possible, send the issue back to me!

@jillh510 jillh510 assigned dryan and unassigned jillh510 Aug 21, 2018
@jillh510
Copy link
Contributor Author

Bummer, no good Flask solution for this. Spec forthcoming.

@jillh510 jillh510 assigned jillh510 and unassigned dryan Aug 22, 2018
@jillh510
Copy link
Contributor Author

Here's a mock for the info that should be on the "carpool details" page that links from the Carpools dashboard at https://nomad.ragtag.org/admin/carpools. Obviously not an example of how the page should be styled! Button actions should be obvious; the "Edit Carpool" button should go to a page with all the same info on it as the "Edit Carpool" button that's shown to drivers.
admin view of carpool details

@jillh510 jillh510 removed their assignment Aug 22, 2018
@dryan
Copy link
Contributor

dryan commented Aug 22, 2018

why not just make that available on that page to any admin? the URL param seems unneeded to me.

@iandees
Copy link
Member

iandees commented Aug 22, 2018

I suggested a separate page so that the carpool details template doesn't need to have a bunch of complex if-blocks in the template to check for roles.

I guess it could be the same URL and we just load a different template if the logged-in user is an admin, but at that point why not just use a different URL?

@jillh510
Copy link
Contributor Author

jillh510 commented Aug 22, 2018

Letting an admin always see the driver's view of a carpool page would mean there's no way for an admin ever to request a ride.

@jillh510
Copy link
Contributor Author

Too late in the game to take this one unless a partner demands it. Branch "admin_carpool_details" has a proposed fix if needed.

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

No branches or pull requests

3 participants