Skip to content

Commit

Permalink
Merge pull request #407 from amansinghbais/270-oms-permission
Browse files Browse the repository at this point in the history
Improved: dxp-component version to incorporate permissions check over goToOms and productIdentifier component. (dxp-270)
  • Loading branch information
ravilodhi authored Oct 25, 2024
2 parents 1197b2e + fcc3fba commit 3871b8b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@casl/ability": "^6.0.0",
"@hotwax/app-version-info": "^1.0.0",
"@hotwax/apps-theme": "^1.2.6",
"@hotwax/dxp-components": "^1.15.3",
"@hotwax/dxp-components": "^1.15.4",
"@hotwax/oms-api": "^1.16.0",
"@ionic/core": "^7.6.0",
"@ionic/vue": "^7.6.0",
Expand Down
3 changes: 2 additions & 1 deletion src/authorization/Actions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export default {
'APP_SHIPMENT_UPDATE': 'APP_SHIPMENT_UPDATE',
'APP_SHIPMENT_ADMIN': 'APP_SHIPMENT_ADMIN',
'APP_PRODUCT_IDENTIFIER_UPDATE': 'APP_PRODUCT_IDENTIFIER_UPDATE'
'APP_PRODUCT_IDENTIFIER_UPDATE': 'APP_PRODUCT_IDENTIFIER_UPDATE',
'APP_COMMERCE_VIEW': 'APP_COMMERCE_VIEW'
}
3 changes: 2 additions & 1 deletion src/authorization/Rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ export default {
'APP_SHIPMENT_ADMIN': 'RECEIVING_ADMIN',
'APP_RECVG_ADMIN': 'COMMON_ADMIN',
'APP_PRODUCT_IDENTIFIER_UPDATE':'COMMON_ADMIN',
'RECEIVING_APP_VIEW': 'RECEIVING_APP_VIEW'
'RECEIVING_APP_VIEW': 'RECEIVING_APP_VIEW',
'APP_COMMERCE_VIEW': 'COMMERCEUSER_VIEW'
} as any
6 changes: 4 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import '@ionic/vue/css/display.css';
import './theme/variables.css';

import store from './store'
import permissionPlugin from '@/authorization';
import permissionPlugin, { Actions, hasPermission } from '@/authorization';
import permissionRules from '@/authorization/Rules';
import permissionActions from '@/authorization/Actions';
import { dxpComponents } from '@hotwax/dxp-components'
Expand All @@ -47,6 +47,7 @@ const app = createApp(App)
actions: permissionActions
})
.use(dxpComponents, {
Actions,
defaultImgUrl: require("@/assets/images/defaultImage.png"),
login,
logout,
Expand All @@ -58,7 +59,8 @@ const app = createApp(App)
localeMessages,
setUserTimeZone,
setProductIdentificationPref,
getAvailableTimeZones
getAvailableTimeZones,
hasPermission
});

// Filters are removed in Vue 3 and global filter introduced https://v3.vuejs.org/guide/migration/filters.html#global-filters
Expand Down

0 comments on commit 3871b8b

Please sign in to comment.