diff --git a/src/controllers/backuprestore.js b/src/controllers/backuprestore.js index 990bc8526..32c1ae5b1 100644 --- a/src/controllers/backuprestore.js +++ b/src/controllers/backuprestore.js @@ -161,10 +161,13 @@ backupRestore.restoreBackup = function (req, res) { var cache = _.find(global.forks, function (f) { return f.name === 'cache' }) + if (cache && cache.fork) { cache.fork.send({ name: 'cache:refresh:force' }) } + require('../permissions').flustRoles() + result = { success: true } } else { result = { success: false, error: data.error } diff --git a/src/permissions/index.js b/src/permissions/index.js index 7d0c8834f..8e37dc91f 100644 --- a/src/permissions/index.js +++ b/src/permissions/index.js @@ -179,6 +179,7 @@ function buildGrants (obj) { module.exports = { register: register, + flustRoles: register, canThis: canThis, hasHierarchyEnabled: hasHierarchyEnabled, parseRoleHierarchy: parseRoleHierarchy,