[auth] created auth collection view

This commit is contained in:
bodnia
2016-03-13 02:11:56 +02:00
parent 0f77177455
commit e90a72ad4a
6 changed files with 180 additions and 129 deletions

View File

@@ -38,7 +38,15 @@ SwaggerUi.Collections.AuthsCollection = Backbone.Collection.extend({
},
isValid: function () {
return this.length === this.where({ valid: true }).length;
var valid = true;
this.models.forEach(function(model) {
if (!model.validate()) {
valid = false;
}
});
return valid;
},
isAuthorized: function () {