Ensures that in-active users are not allowed to login. (#618)
This commit is contained in:
9
lemur/static/app/angular/app.js
vendored
9
lemur/static/app/angular/app.js
vendored
@ -105,6 +105,15 @@
|
||||
RestangularConfigurer.setBaseUrl('http://localhost:8000/api/1');
|
||||
RestangularConfigurer.setDefaultHttpFields({withCredentials: true});
|
||||
|
||||
// handle situation where our token has become invalid.
|
||||
RestangularConfigurer.setErrorInterceptor(function (response) {
|
||||
if (response.status === 403) {
|
||||
$auth.logout();
|
||||
$location.path('/login');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
RestangularConfigurer.addResponseInterceptor(function (data, operation) {
|
||||
var extractedData;
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
<td data-title="'Active'" sortable="'active'">
|
||||
<i class="glyphicon glyphicon-ok" ng-show="certificate.san == 'true'"></i>
|
||||
<i class="glyphicon glyphicon-remove" ng-show="certificate.san == 'false'"></i>
|
||||
<i ng-show="user.active" class="glyphicon glyphicon-ok"></i><i ng-show="!user.active" class="glyphicon gplyphinco-remove"></i>
|
||||
<i ng-show="user.active" class="glyphicon glyphicon-ok"></i><i ng-show="!user.active" class="glyphicon glyphicon-remove"></i>
|
||||
</td>
|
||||
<td data-title="''">
|
||||
<div class="btn-group-vertical pull-right">
|
||||
|
Reference in New Issue
Block a user