From 3c16859bfe7fe3b0e78f07ffb524a10bbf4f4f16 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Wed, 28 Feb 2024 10:38:44 +1300 Subject: [PATCH] admin update user roles - permissions cache warning --- app/admin/routes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/admin/routes.py b/app/admin/routes.py index 9811da09..32f2e7d4 100644 --- a/app/admin/routes.py +++ b/app/admin/routes.py @@ -559,6 +559,8 @@ def admin_user_edit(user_id): if role.id != form.role.data: user.roles.remove(role) user.roles.append(Role.query.get(form.role.data)) + if form.role.data == 4: + flash(_("Permissions are cached for 50 seconds so new admin roles won't take effect immediately.")) db.session.commit() user.flush_cache()