Skip to content

Commit

Permalink
Merge pull request #303 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 button. (dxp-270)
  • Loading branch information
ravilodhi authored Nov 6, 2024
2 parents 4181aea + 9b4993e commit a6c6d3f
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 9 deletions.
71 changes: 66 additions & 5 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.13.0",
"@hotwax/dxp-components": "^1.15.4",
"@hotwax/oms-api": "^1.15.1",
"@ionic/core": "^7.6.0",
"@ionic/vue": "^7.6.0",
Expand Down
1 change: 1 addition & 0 deletions src/authorization/Actions.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export default {
'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
@@ -1,4 +1,5 @@
export default {
"APP_INVENTORY_VIEW": "MDM_IMP_INVENTORY_VIEW",
"IMPORT_APP_VIEW": "IMPORT_APP_VIEW"
"IMPORT_APP_VIEW": "IMPORT_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 @@ -26,7 +26,7 @@ import '@hotwax/apps-theme';

import store from './store'
import { DateTime } from 'luxon';
import permissionPlugin from '@/authorization';
import permissionPlugin, { Actions, hasPermission } from '@/authorization';
import permissionRules from '@/authorization/Rules';
import permissionActions from '@/authorization/Actions';
import logger from './logger';
Expand All @@ -51,6 +51,7 @@ const app = createApp(App)
actions: permissionActions
})
.use(dxpComponents, {
Actions,
defaultImgUrl: require("@/assets/images/defaultImage.png"),
login,
logout,
Expand All @@ -60,7 +61,8 @@ const app = createApp(App)
initialise,
localeMessages,
setUserTimeZone,
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 a6c6d3f

Please sign in to comment.