This commit is contained in:
Erik 2022-11-09 11:50:49 +02:00
parent f5e4c11b99
commit 5842448f1e
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,22 @@
class User {
static defaultPermissions = {};
constructor (db, data) {
this.id = data._id;
this._db = db;
this.permissions = { ...User.defaultPermissions, ...data.permissions };
}
hasPermission (perm) {
return this.permissions[perm];
}
}
module.exports = User;

View File

@ -0,0 +1,3 @@
module.exports = {
User: require('./User')
};