Skip to content

Commit

Permalink
perf(restore): flushRoles on successful restore
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Feb 17, 2019
1 parent 0a8f0cb commit 7b44537
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/controllers/backuprestore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
1 change: 1 addition & 0 deletions src/permissions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ function buildGrants (obj) {

module.exports = {
register: register,
flustRoles: register,
canThis: canThis,
hasHierarchyEnabled: hasHierarchyEnabled,
parseRoleHierarchy: parseRoleHierarchy,
Expand Down

0 comments on commit 7b44537

Please sign in to comment.