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