mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 20:34:02 +03:00
ba810fb0bb
Function wrapper and use strict pragma removed from all node files
26 lines
523 B
JavaScript
26 lines
523 B
JavaScript
var GhostBookshelf = require('./base'),
|
|
User = require('./user').User,
|
|
Role = require('./role').Role,
|
|
Permission,
|
|
Permissions;
|
|
|
|
Permission = GhostBookshelf.Model.extend({
|
|
tableName: 'permissions',
|
|
|
|
roles: function () {
|
|
return this.belongsToMany(Role);
|
|
},
|
|
|
|
users: function () {
|
|
return this.belongsToMany(User);
|
|
}
|
|
});
|
|
|
|
Permissions = GhostBookshelf.Collection.extend({
|
|
model: Permission
|
|
});
|
|
|
|
module.exports = {
|
|
Permission: Permission,
|
|
Permissions: Permissions
|
|
}; |