Skip to content

Commit

Permalink
feat: b2c user accounts do not respect turning features on and off
Browse files Browse the repository at this point in the history
  • Loading branch information
kris-liu-smile committed Jun 27, 2023
1 parent 0fa280e commit 27645e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions apps/storefront/src/components/table/B3PaginationTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ function PaginationTable(
}
})

console.log(copyCacheAllList, 'copyCacheAllList')

setCacheAllList(copyCacheAllList)
}

Expand Down
6 changes: 4 additions & 2 deletions apps/storefront/src/shared/routes/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,18 @@ const firstLevelRouting: RouteFirstLevelItem[] = [
]
const getAllowedRoutes = (globalState: GlobalState): RouteItem[] => {
const { isB2BUser, role, isAgenting, storefrontConfig } = globalState

return routes.filter((item: RouteItem) => {
const { permissions = [] } = item

if (role === 3 && !isAgenting) {
return permissions.includes(4)
}

// b2b user
// bc user
if (!isB2BUser) {
const navListKey =
storefrontConfig && storefrontConfig[item.configKey || '']
if (typeof navListKey === 'boolean') return navListKey
return permissions.includes(99)
}

Expand Down

0 comments on commit 27645e4

Please sign in to comment.