Code review comment for lp:~jakedahn/horizon/lp760239

Revision history for this message
Devin Carlen (devcamcar) wrote :

8 + except exceptions.NovaUnauthorizedError, e:
9 + messages.error(request, 'Permission Denied')
10 + return redirect('dashboard_permission_denied')

Hey, in this case, we don't need to redirect. Permission denied as an error panel is sufficient.

Essentially we want handle_exception (or wrap_exception or whatever I called it) to catch the NovaUnauthorizedError. This will be a method of last resort - as we identify other places that need to explicitly catch the NovaUnauthorizedException we will add try/excepts there as well.

review: Needs Fixing

« Back to merge proposal