From 1edd126a43dc4fb1e2767c9175e553b98374da70 Mon Sep 17 00:00:00 2001 From: Padreug Date: Sun, 17 May 2026 13:52:50 +0200 Subject: [PATCH] Reset role permission/user state when closing the role dialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closeViewRoleDialog already clears rolePermissionsForView and roleUsersForView; closeRoleDialog (used by both Edit and Create flows) did not. With editRole now populating those arrays, leftover state would otherwise survive a close → open-Create round trip. The Create template branch doesn't read the arrays today (v-if guarded on editingRole), so this is defensive — keeps the two close handlers symmetrical and avoids future regressions if the Create branch ever starts referencing them. --- static/js/permissions.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/js/permissions.js b/static/js/permissions.js index bd66f10..b2a4f9d 100644 --- a/static/js/permissions.js +++ b/static/js/permissions.js @@ -846,6 +846,8 @@ window.app = Vue.createApp({ this.showCreateRoleDialog = false this.editingRole = false this.selectedRole = null + this.roleUsersForView = [] + this.rolePermissionsForView = [] this.resetRoleForm() },