From 142b26d7dad7417823bad98bd5f07faa53dc0b6b Mon Sep 17 00:00:00 2001 From: padreug Date: Tue, 11 Nov 2025 23:18:40 +0100 Subject: [PATCH] Set default permission type to 'submit_expense' in grant forms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed default permission type from 'read' to 'submit_expense' in all permission grant forms, as this is the most common use case when Castle admins grant permissions to users. Changes: - grantForm initialization (line 31): 'read' → 'submit_expense' - bulkGrantForm initialization (line 42): 'read' → 'submit_expense' - resetGrantForm() method (line 315): 'read' → 'submit_expense' - resetBulkGrantForm() method (line 402): 'read' → 'submit_expense' Rationale: Most users need to submit expenses to their assigned accounts, making 'submit_expense' a more practical default than 'read'. Admins can still select other permission types from the dropdown if needed. Affected: static/js/permissions.js Co-Authored-By: Claude --- static/js/permissions.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/js/permissions.js b/static/js/permissions.js index 8a30fff..dcacb87 100644 --- a/static/js/permissions.js +++ b/static/js/permissions.js @@ -28,7 +28,7 @@ window.app = Vue.createApp({ grantForm: { user_id: '', account_id: '', - permission_type: 'read', + permission_type: 'submit_expense', notes: '', expires_at: '' }, @@ -39,7 +39,7 @@ window.app = Vue.createApp({ bulkGrantForm: { user_ids: [], account_id: '', - permission_type: 'read', + permission_type: 'submit_expense', notes: '', expires_at: '' }, @@ -312,7 +312,7 @@ window.app = Vue.createApp({ this.grantForm = { user_id: '', account_id: '', - permission_type: 'read', + permission_type: 'submit_expense', notes: '', expires_at: '' } @@ -399,7 +399,7 @@ window.app = Vue.createApp({ this.bulkGrantForm = { user_ids: [], account_id: '', - permission_type: 'read', + permission_type: 'submit_expense', notes: '', expires_at: '' }