17 lines
637 B
JavaScript
17 lines
637 B
JavaScript
/* eslint-disable no-console */
|
|
const { PermissionManager } = require('../src/util');
|
|
const { inspect } = require('node:util');
|
|
|
|
const log = (obj) => {
|
|
console.log(inspect(obj, { depth: 10 }));
|
|
};
|
|
// PermissionManager.ensurePermission('administrator');
|
|
PermissionManager.ensurePermission('administrator:removeuser:force:bruh:moment:broo');
|
|
PermissionManager.ensurePermission('developer:toggledebug');
|
|
PermissionManager.ensurePermission('developer');
|
|
|
|
// log(PermissionManager);
|
|
|
|
const perms = { developer: { default: 10 }, administrator: 10 };
|
|
log(PermissionManager.merge(perms, PermissionManager.DefaultPermissions));
|
|
// log(perms);
|