mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 14:43:08 +03:00
30b4eb07f7
- This is a first pass at getting a more logical structure. The focus is on moving from admin/frontend to client/server. - The location of the databases is highly important, this isn't expected to change again In the future - client/assets should probably become public/ - more stuff should be shared (helpers etc) - cleanup some confusion around tpl and views
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
|
|
}; |