mozilla/socorro — pull request #1782 by peterbe (2014-01-10 19:19:01+00:00)
Title: Bug 794548 display exploitability rating in ui to logged in users

@AdrianGaudbert r?

cc @lauraxt @rhelmer

So, the only place where the individual exploitability rating is available for a crash is in the `/crash/` middleware endpoint. As far as I can tell, it used to be, in the days of PHP, that to make the report index it would...

* pull raw crash from HBase
* pull processed crash from HBase
* pull minimal information from PG using `/crash/uuid/xxx`

Whereas in Django we only...

* pull raw crash from HBase
* pull processed crash from HBase

With this patch, the only data I'm interested in from `/crash/` is the `exploitability` and there's no point pulling it if you don't have permission to view it. So, with this patch if you have the permission it does only more middleware fetch just to get that number.

I see no other way to crack this bug. But it feels kinda strange to pull individual crash data from PG just to get one single little number.
We have some bigger bolder plans in the future to pull more of that JSON stuff from PG and that day we can maybe review all this to avoid an extra PG get just for one single piece of data.