[auth] UI changes
This commit is contained in:
@@ -23,6 +23,12 @@ SwaggerUi.Collections.AuthsCollection = Backbone.Collection.extend({
|
||||
case 'oauth2':
|
||||
result = new SwaggerUi.Models.Oauth2Model(model);
|
||||
break;
|
||||
case 'basic':
|
||||
result = new SwaggerUi.Models.BasicAuthModel(model);
|
||||
break;
|
||||
case 'apiKey':
|
||||
result = new SwaggerUi.Models.ApiKeyAuthModel(model);
|
||||
break;
|
||||
default:
|
||||
result = new Backbone.Model(model);
|
||||
}
|
||||
@@ -37,5 +43,9 @@ SwaggerUi.Collections.AuthsCollection = Backbone.Collection.extend({
|
||||
|
||||
isAuthorized: function () {
|
||||
return this.length === this.where({ isLogout: true }).length;
|
||||
},
|
||||
|
||||
isPartiallyAuthorized: function () {
|
||||
return this.where({ isLogout: true }).length > 0;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user