mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-24 15:13:07 +01:00
Frontend
This commit is contained in:
1 parent
80d78cbf25
commit
b38b988da4
40 files changed
+1419
No files matched your search
@@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
const _ = require('underscore');
|
||||
const Backbone = require('backbone');
|
||||
|
||||
const model = Backbone.Model.extend({
|
||||
idAttribute: 'id',
|
||||
|
||||
defaults: function () {
|
||||
return {
|
||||
name: '',
|
||||
nickname: '',
|
||||
email: '',
|
||||
is_disabled: false,
|
||||
roles: []
|
||||
};
|
||||
},
|
||||
|
||||
isAdmin: function () {
|
||||
return _.indexOf(this.get('roles'), 'admin') !== -1;
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
Model: model,
|
||||
Collection: Backbone.Collection.extend({
|
||||
model: model
|
||||
})
|
||||
};
|
||||
Reference in new issue
Block a user