OpenNews / opennews-source

Code refactor for Source, a website that spotlights work from the developers, designers, and data analysts at the intersection of journalism and tech: https://source.opennews.org
MIT License
5 stars 3 forks source link

Jobs update page should show login form when Source admin users visit it #137

Open ryanpitts opened 7 years ago

ryanpitts commented 7 years ago

Splitting this out from https://github.com/OpenNews/project-issues/issues/771

Currently, if you're logged into the Source CMS as an admin, the /jobs/update/ page will throw a 500 error at you. This page expects to find a logged-in user's email address attached to a organization account, which generally isn't the case for a Source admin. (For a user who's not logged in, the /jobs/update/ page shows the form to get a login link.)

Generally speaking, this is the behavior that we want -- if a user is logged in but isn't an organizational admin, they shouldn't be able to do anything on that page. But it's not great for the page to appear broken when a Source admin visits it, so we should special-case here.