[auth] created auth collection view
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user