use MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES permission (#881)
This commit is contained in:
parent
e55805a79d
commit
09625eb486
4 changed files with 25 additions and 21 deletions
|
@ -48,7 +48,7 @@ export function createConfigurationMenu(intl: IntlShape): MenuSection[] {
|
|||
id: "configurationMenuAttributes"
|
||||
}),
|
||||
icon: <Attributes fontSize="inherit" viewBox="0 0 44 44" />,
|
||||
permission: PermissionEnum.MANAGE_PRODUCTS,
|
||||
permission: PermissionEnum.MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES,
|
||||
title: intl.formatMessage(sectionNames.attributes),
|
||||
url: attributeListUrl()
|
||||
},
|
||||
|
@ -58,7 +58,7 @@ export function createConfigurationMenu(intl: IntlShape): MenuSection[] {
|
|||
id: "configurationMenuProductTypes"
|
||||
}),
|
||||
icon: <ProductTypes fontSize="inherit" viewBox="0 0 44 44" />,
|
||||
permission: PermissionEnum.MANAGE_PRODUCTS,
|
||||
permission: PermissionEnum.MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES,
|
||||
title: intl.formatMessage(sectionNames.productTypes),
|
||||
url: productTypeListUrl()
|
||||
}
|
||||
|
|
|
@ -345,7 +345,7 @@ export const permissions: ShopInfo_shop_permissions[] = [
|
|||
name: "Manage products."
|
||||
},
|
||||
{
|
||||
code: PermissionEnum.MANAGE_PRODUCTS,
|
||||
code: PermissionEnum.MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES,
|
||||
name: "Manage product types and attributes."
|
||||
},
|
||||
{
|
||||
|
@ -444,7 +444,7 @@ export const adminUserPermissions: User_userPermissions[] = [
|
|||
},
|
||||
{
|
||||
__typename: "UserPermission",
|
||||
code: PermissionEnum.MANAGE_PRODUCTS,
|
||||
code: PermissionEnum.MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES,
|
||||
name: "Manage product types and attributes."
|
||||
},
|
||||
{
|
||||
|
|
|
@ -208,7 +208,9 @@ const Routes: React.FC = () => {
|
|||
component={ProductSection}
|
||||
/>
|
||||
<SectionRoute
|
||||
permissions={[PermissionEnum.MANAGE_PRODUCTS]}
|
||||
permissions={[
|
||||
PermissionEnum.MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES
|
||||
]}
|
||||
path="/product-types"
|
||||
component={ProductTypesSection}
|
||||
/>
|
||||
|
@ -248,7 +250,9 @@ const Routes: React.FC = () => {
|
|||
component={NavigationSection}
|
||||
/>
|
||||
<SectionRoute
|
||||
permissions={[PermissionEnum.MANAGE_PRODUCTS]}
|
||||
permissions={[
|
||||
PermissionEnum.MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES
|
||||
]}
|
||||
path={attributeSection}
|
||||
component={AttributeSection}
|
||||
/>
|
||||
|
|
|
@ -132973,10 +132973,10 @@ exports[`Storyshots Views / Permission Groups / Permission Group Create default
|
|||
class="MuiIconButton-label-id"
|
||||
>
|
||||
<input
|
||||
aria-labelledby="MANAGE_PRODUCTS"
|
||||
aria-labelledby="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
class="PrivateSwitchBase-input-id"
|
||||
data-indeterminate="false"
|
||||
name="MANAGE_PRODUCTS"
|
||||
name="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
tabindex="-1"
|
||||
type="checkbox"
|
||||
/>
|
||||
|
@ -133001,7 +133001,7 @@ exports[`Storyshots Views / Permission Groups / Permission Group Create default
|
|||
</div>
|
||||
<div
|
||||
class="MuiListItemText-root-id MuiListItemText-dense-id"
|
||||
id="MANAGE_PRODUCTS"
|
||||
id="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
>
|
||||
<span
|
||||
class="MuiTypography-root-id MuiListItemText-primary-id MuiTypography-body2-id"
|
||||
|
@ -133839,10 +133839,10 @@ exports[`Storyshots Views / Permission Groups / Permission Group Create errors 1
|
|||
class="MuiIconButton-label-id"
|
||||
>
|
||||
<input
|
||||
aria-labelledby="MANAGE_PRODUCTS"
|
||||
aria-labelledby="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
class="PrivateSwitchBase-input-id"
|
||||
data-indeterminate="false"
|
||||
name="MANAGE_PRODUCTS"
|
||||
name="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
tabindex="-1"
|
||||
type="checkbox"
|
||||
/>
|
||||
|
@ -133867,7 +133867,7 @@ exports[`Storyshots Views / Permission Groups / Permission Group Create errors 1
|
|||
</div>
|
||||
<div
|
||||
class="MuiListItemText-root-id MuiListItemText-dense-id"
|
||||
id="MANAGE_PRODUCTS"
|
||||
id="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
>
|
||||
<span
|
||||
class="MuiTypography-root-id MuiListItemText-primary-id MuiTypography-body2-id"
|
||||
|
@ -134703,10 +134703,10 @@ exports[`Storyshots Views / Permission Groups / Permission Group Create loading
|
|||
class="MuiIconButton-label-id"
|
||||
>
|
||||
<input
|
||||
aria-labelledby="MANAGE_PRODUCTS"
|
||||
aria-labelledby="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
class="PrivateSwitchBase-input-id"
|
||||
data-indeterminate="false"
|
||||
name="MANAGE_PRODUCTS"
|
||||
name="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
tabindex="-1"
|
||||
type="checkbox"
|
||||
/>
|
||||
|
@ -134731,7 +134731,7 @@ exports[`Storyshots Views / Permission Groups / Permission Group Create loading
|
|||
</div>
|
||||
<div
|
||||
class="MuiListItemText-root-id MuiListItemText-dense-id"
|
||||
id="MANAGE_PRODUCTS"
|
||||
id="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
>
|
||||
<span
|
||||
class="MuiTypography-root-id MuiListItemText-primary-id MuiTypography-body2-id"
|
||||
|
@ -136098,10 +136098,10 @@ exports[`Storyshots Views / Permission Groups / Permission Group Details default
|
|||
class="MuiIconButton-label-id"
|
||||
>
|
||||
<input
|
||||
aria-labelledby="MANAGE_PRODUCTS"
|
||||
aria-labelledby="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
class="PrivateSwitchBase-input-id"
|
||||
data-indeterminate="false"
|
||||
name="MANAGE_PRODUCTS"
|
||||
name="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
tabindex="-1"
|
||||
type="checkbox"
|
||||
/>
|
||||
|
@ -136126,7 +136126,7 @@ exports[`Storyshots Views / Permission Groups / Permission Group Details default
|
|||
</div>
|
||||
<div
|
||||
class="MuiListItemText-root-id MuiListItemText-dense-id"
|
||||
id="MANAGE_PRODUCTS"
|
||||
id="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
>
|
||||
<span
|
||||
class="MuiTypography-root-id MuiListItemText-primary-id MuiTypography-body2-id"
|
||||
|
@ -137742,10 +137742,10 @@ exports[`Storyshots Views / Permission Groups / Permission Group Details no memb
|
|||
class="MuiIconButton-label-id"
|
||||
>
|
||||
<input
|
||||
aria-labelledby="MANAGE_PRODUCTS"
|
||||
aria-labelledby="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
class="PrivateSwitchBase-input-id"
|
||||
data-indeterminate="false"
|
||||
name="MANAGE_PRODUCTS"
|
||||
name="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
tabindex="-1"
|
||||
type="checkbox"
|
||||
/>
|
||||
|
@ -137770,7 +137770,7 @@ exports[`Storyshots Views / Permission Groups / Permission Group Details no memb
|
|||
</div>
|
||||
<div
|
||||
class="MuiListItemText-root-id MuiListItemText-dense-id"
|
||||
id="MANAGE_PRODUCTS"
|
||||
id="MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES"
|
||||
>
|
||||
<span
|
||||
class="MuiTypography-root-id MuiListItemText-primary-id MuiTypography-body2-id"
|
||||
|
|
Loading…
Reference in a new issue