Skip to content

Commit

Permalink
Merge pull request #435 from amansinghbais/#434
Browse files Browse the repository at this point in the history
Improved: added permission check over the force scan toggle (#434)
  • Loading branch information
ravilodhi authored Jan 31, 2025
2 parents 815f12e + 467ea98 commit e79169f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/authorization/Actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ export default {
'APP_SHIPMENT_UPDATE': 'APP_SHIPMENT_UPDATE',
'APP_SHIPMENT_ADMIN': 'APP_SHIPMENT_ADMIN',
'APP_PRODUCT_IDENTIFIER_UPDATE': 'APP_PRODUCT_IDENTIFIER_UPDATE',
'APP_COMMERCE_VIEW': 'APP_COMMERCE_VIEW'
'APP_COMMERCE_VIEW': 'APP_COMMERCE_VIEW',
'APP_UPDT_FULFILL_FORCE_SCAN_CONFIG': 'APP_UPDT_FULFILL_FORCE_SCAN_CONFIG'
}
3 changes: 2 additions & 1 deletion src/authorization/Rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ export default {
'APP_RECVG_ADMIN': 'COMMON_ADMIN',
'APP_PRODUCT_IDENTIFIER_UPDATE':'COMMON_ADMIN',
'RECEIVING_APP_VIEW': 'RECEIVING_APP_VIEW',
'APP_COMMERCE_VIEW': 'COMMERCEUSER_VIEW'
'APP_COMMERCE_VIEW': 'COMMERCEUSER_VIEW',
'APP_UPDT_FULFILL_FORCE_SCAN_CONFIG': 'COMMON_ADMIN'
} as any
2 changes: 1 addition & 1 deletion src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</ion-card-title>
</ion-card-header>
<ion-card-content v-html="barcodeContentMessage"></ion-card-content>
<ion-item>
<ion-item :disabled="!hasPermission(Actions.APP_UPDT_FULFILL_FORCE_SCAN_CONFIG)">
<ion-toggle label-placement="start" :checked="isForceScanEnabled" @click.prevent="updateForceScanStatus($event)">{{ translate("Require scanning") }}</ion-toggle>
</ion-item>
<ion-item lines="none">
Expand Down

0 comments on commit e79169f

Please sign in to comment.