Set default permission type to 'submit_expense' in grant forms
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 <noreply@anthropic.com>
This commit is contained in:
parent
5d38dc188b
commit
142b26d7da
1 changed files with 4 additions and 4 deletions
|
|
@ -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: ''
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue