Skip to content

Commit

Permalink
Merge pull request #299 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 18d5646 + 60eca36 commit f44d44f
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 @@ -17,7 +17,7 @@
"@casl/ability": "^6.0.0",
"@hotwax/app-version-info": "^1.0.0",
"@hotwax/apps-theme": "^1.2.6",
"@hotwax/dxp-components": "1.15.2",
"@hotwax/dxp-components": "1.15.4",
"@hotwax/oms-api": "1.14.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
Expand Up @@ -9,5 +9,6 @@ export default {
'APP_PERMISSION_CREATE': 'APP_PERMISSION_CREATE',
'APP_PERMISSION_UPDATE': 'APP_PERMISSION_UPDATE',
'APP_PERMISSION_VIEW': 'APP_PERMISSION_VIEW',
'APP_USER_CREATE': 'APP_USER_CREATE'
'APP_USER_CREATE': 'APP_USER_CREATE',
'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 @@ -10,5 +10,6 @@ export default {
'APP_PERMISSION_UPDATE': 'SECURITY_UPDATE OR SECURITY_ADMIN',
'APP_PERMISSION_VIEW': 'SECURITY_VIEW OR SECURITY_ADMIN',
'APP_SUPER_USER': 'WEBTOOLS_VIEW',
'USERS_APP_VIEW': 'USERS_APP_VIEW'
'USERS_APP_VIEW': 'USERS_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 '@hotwax/apps-theme';

import store from './store'

import permissionPlugin from '@/authorization';
import permissionPlugin, { Actions, hasPermission } from '@/authorization';
import permissionRules from '@/authorization/Rules';
import permissionActions from '@/authorization/Actions';

Expand All @@ -52,6 +52,7 @@ const app = createApp(App)
level: process.env.VUE_APP_DEFAULT_LOG_LEVEL
})
.use(dxpComponents, {
Actions,
appLoginUrl: process.env.VUE_APP_LOGIN_URL as string,
defaultImgUrl: require("@/assets/images/defaultImage.png"),
getConfig,
Expand All @@ -62,7 +63,8 @@ const app = createApp(App)
localeMessages,
setUserLocale,
setUserTimeZone,
getAvailableTimeZones
getAvailableTimeZones,
hasPermission
});

router.isReady().then(() => {
Expand Down

0 comments on commit f44d44f

Please sign in to comment.