Fixing some confusion between 401 vs 403 error code. 401 indicates that the user should attempt to authenticate again. Where as 403 indicates the user is authenticated but not allowed to complete an action. (#804)

Closes #767
This commit is contained in:
kevgliss
2017-05-18 13:20:17 -07:00
committed by GitHub
parent 7ad471a810
commit 307a73c752
3 changed files with 6 additions and 6 deletions

View File

@ -106,7 +106,7 @@
// handle situation where our token has become invalid.
RestangularConfigurer.setErrorInterceptor(function (response) {
if (response.status === 403) {
if (response.status === 401) {
$auth.logout();
$location.path('/login');
return false;