summaryrefslogtreecommitdiffstats
path: root/store/local_cache_supplier_roles.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2018-04-18 10:18:07 +0100
committerGitHub <noreply@github.com>2018-04-18 10:18:07 +0100
commitb13a228b0451098ea32933a36fe64566e366583d (patch)
tree569aa0c6c5f273b806b4c3e0c59801204916492c /store/local_cache_supplier_roles.go
parenta1882d4004ce624dad1b8624804e974f209efe8d (diff)
downloadchat-b13a228b0451098ea32933a36fe64566e366583d.tar.gz
chat-b13a228b0451098ea32933a36fe64566e366583d.tar.bz2
chat-b13a228b0451098ea32933a36fe64566e366583d.zip
MM-10121: CLI command to reset permissions system to default state. (#8637)
* MM-10121: CLI command to reset permissions system to default state. * Review comment.
Diffstat (limited to 'store/local_cache_supplier_roles.go')
-rw-r--r--store/local_cache_supplier_roles.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/store/local_cache_supplier_roles.go b/store/local_cache_supplier_roles.go
index 8cbde0a23..7c82f60eb 100644
--- a/store/local_cache_supplier_roles.go
+++ b/store/local_cache_supplier_roles.go
@@ -68,3 +68,10 @@ func (s *LocalCacheSupplier) RoleGetByNames(ctx context.Context, roleNames []str
return result
}
+
+func (s *LocalCacheSupplier) RolePermanentDeleteAll(ctx context.Context, hints ...LayeredStoreHint) *LayeredStoreSupplierResult {
+ defer s.roleCache.Purge()
+ defer s.doClearCacheCluster(s.roleCache)
+
+ return s.Next().RolePermanentDeleteAll(ctx, hints...)
+}