caches: clear perms cache manager while updating settings for auth plugins

This commit is contained in:
Marcin Kuzminski 2017-10-12 22:38:04 +02:00
parent 27aff1de7a
commit 3d0069b5f4

View file

@ -27,7 +27,7 @@ from pyramid.renderers import render
from pyramid.response import Response
from rhodecode.authentication.base import (
get_auth_cache_manager, get_authn_registry)
get_auth_cache_manager, get_perms_cache_manager, get_authn_registry)
from rhodecode.lib import auth
from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator
from rhodecode.model.forms import AuthSettingsForm
@ -168,6 +168,10 @@ class AuthSettingsView(object):
cache_manager = get_auth_cache_manager()
cache_manager.clear()
cache_manager = get_perms_cache_manager()
cache_manager.clear()
self.request.session.flash(
_('Auth settings updated successfully.'),
queue='success')