free-be-account 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +6 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -541,7 +541,7 @@ module.exports = (app) => ({
541
541
  */
542
542
  clearCachedPermission: (app, p = '*') => {
543
543
  // clear all cached permission control (user permissions)
544
- app.cache.keys(`perm_ctrl_${p}`).then(ks => {
544
+ Promise.resolve(app.cache.keys(`perm_ctrl_${p}`)).then(ks => {
545
545
  ks.forEach(k => app.cache.del(k))
546
546
  });
547
547
  },
@@ -1367,10 +1367,11 @@ module.exports = (app) => ({
1367
1367
  onRoutersReady: async (app, m) => {
1368
1368
  // create default user if it's an empty db
1369
1369
  if (await m.models['account'].countDocuments({}) <= 0) {
1370
- let perms = app.ctx.serviceList()
1371
- if (!clearPermission(perms)) {
1372
- perms = {}
1373
- }
1370
+ // let perms = app.ctx.serviceList()
1371
+ // if (!clearPermission(perms)) {
1372
+ // perms = {}
1373
+ // }
1374
+ const perm = '*';
1374
1375
 
1375
1376
  await m.models.account.create({
1376
1377
  Saved: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "free-be-account",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "main": "index.js",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {