diff --git a/.changeset/thin-avocados-grow.md b/.changeset/thin-avocados-grow.md
new file mode 100644
index 00000000000..05db5e03d2e
--- /dev/null
+++ b/.changeset/thin-avocados-grow.md
@@ -0,0 +1,6 @@
+---
+"saleor-dashboard": patch
+---
+
+Allow all user to access to APPS tab without checking any permissions. User will be able to see installed app list and enter to each apps.
+Each app will be responsible for checking user permissions.
diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json
index 70e6db92462..e9eed742fe6 100644
--- a/locale/defaultMessages.json
+++ b/locale/defaultMessages.json
@@ -3891,6 +3891,9 @@
"context": "header",
"string": "{webhookName} Details"
},
+ "ORQvOg": {
+ "string": "You don't have permission to perform this action"
+ },
"OTDo9I": {
"context": "tab name",
"string": "All staff members"
@@ -4440,6 +4443,10 @@
"S8kqP9": {
"string": "Conditions"
},
+ "S90DJO": {
+ "context": "Button with app settings label",
+ "string": "App settings"
+ },
"SBb6Ej": {
"context": "select a warehouse to fulfill product from",
"string": "Select warehouse..."
diff --git a/playwright/tests/singlePermissions/channelsWebhooks.spec.ts b/playwright/tests/singlePermissions/channelsWebhooks.spec.ts
index 0f83e815a1d..482803863ff 100644
--- a/playwright/tests/singlePermissions/channelsWebhooks.spec.ts
+++ b/playwright/tests/singlePermissions/channelsWebhooks.spec.ts
@@ -16,7 +16,7 @@ test("TC: SALEOR_11 User should be able to navigate to channel list as a staff m
await page.goto(URL_LIST.homePage);
await mainMenuPage.openConfiguration();
- await mainMenuPage.expectMenuItemsCount(2);
+ await mainMenuPage.expectMenuItemsCount(3);
await configurationPage.openChannels();
await expect(channelPage.createChannelButton).toBeVisible();
@@ -30,7 +30,7 @@ test("TC: SALEOR_12 User should be able to navigate to webhooks and events as a
const configurationPage = new ConfigurationPage(page);
await page.goto(URL_LIST.configuration);
- await mainMenuPage.expectMenuItemsCount(2);
+ await mainMenuPage.expectMenuItemsCount(3);
await configurationPage.openWebhooksAndEvents();
await expect(webhooksEventsPage.createAppButton).toBeVisible();
});
diff --git a/playwright/tests/singlePermissions/contentPage.spec.ts b/playwright/tests/singlePermissions/contentPage.spec.ts
index 8178b010a04..d74a42762d1 100644
--- a/playwright/tests/singlePermissions/contentPage.spec.ts
+++ b/playwright/tests/singlePermissions/contentPage.spec.ts
@@ -18,7 +18,7 @@ test("TC: SALEOR_14 User should be able to navigate to content list as a staff m
await page.goto(URL_LIST.homePage);
await mainMenuPage.openContent();
await expect(contentPage.createContentButton).toBeVisible();
- await mainMenuPage.expectMenuItemsCount(3);
+ await mainMenuPage.expectMenuItemsCount(4);
await basePage.expectGridToBeAttached();
});
test("TC: SALEOR_15 User should be able to navigate to page types list as a staff member using CONTENT aka PAGE permission @e2e", async ({
@@ -36,5 +36,5 @@ test("TC: SALEOR_15 User should be able to navigate to page types list as a staf
await configurationPage.openPageTypes();
await expect(pageTypesPage.createPageTypeButton).toBeVisible();
- await mainMenuPage.expectMenuItemsCount(3);
+ await mainMenuPage.expectMenuItemsCount(4);
});
diff --git a/playwright/tests/singlePermissions/customer.spec.ts b/playwright/tests/singlePermissions/customer.spec.ts
index feff873ec17..65e4306e0b2 100644
--- a/playwright/tests/singlePermissions/customer.spec.ts
+++ b/playwright/tests/singlePermissions/customer.spec.ts
@@ -17,5 +17,5 @@ test("TC: SALEOR_13 User should be able to navigate to customer list as a staff
await mainMenuPage.openCustomers();
await expect(customersPage.createCustomerButton).toBeVisible();
await basePage.expectGridToBeAttached();
- await mainMenuPage.expectMenuItemsCount(2);
+ await mainMenuPage.expectMenuItemsCount(3);
});
diff --git a/playwright/tests/singlePermissions/discount.spec.ts b/playwright/tests/singlePermissions/discount.spec.ts
index e217ba7be6b..95c9da29301 100644
--- a/playwright/tests/singlePermissions/discount.spec.ts
+++ b/playwright/tests/singlePermissions/discount.spec.ts
@@ -18,7 +18,7 @@ test("TC: SALEOR_6 User should be able to navigate to discount list as a staff m
await mainMenuPage.openDiscounts();
await expect(discountsPage.createDiscountButton).toBeVisible();
await basePage.expectGridToBeAttached();
- await mainMenuPage.expectMenuItemsCount(3);
+ await mainMenuPage.expectMenuItemsCount(4);
});
test("TC: SALEOR_7 User should be able to navigate to voucher list as a staff member using DISCOUNTS permission @e2e", async ({
@@ -32,5 +32,5 @@ test("TC: SALEOR_7 User should be able to navigate to voucher list as a staff me
await mainMenuPage.openVouchers();
await expect(vouchersPage.createVoucherButton).toBeVisible();
await basePage.expectGridToBeAttached();
- await mainMenuPage.expectMenuItemsCount(3);
+ await mainMenuPage.expectMenuItemsCount(4);
});
diff --git a/playwright/tests/singlePermissions/orders.spec.ts b/playwright/tests/singlePermissions/orders.spec.ts
index 4142685fae8..12a58d6d543 100644
--- a/playwright/tests/singlePermissions/orders.spec.ts
+++ b/playwright/tests/singlePermissions/orders.spec.ts
@@ -18,7 +18,7 @@ test("TC: SALEOR_8 User should be able to navigate to order list as a staff memb
await mainMenuPage.openOrders();
await expect(ordersPage.createOrderButton).toBeVisible();
await basePage.expectGridToBeAttached();
- await mainMenuPage.expectMenuItemsCount(3);
+ await mainMenuPage.expectMenuItemsCount(4);
});
test("TC: SALEOR_9 User should be able to navigate to draft list as a staff member using ORDER permission @e2e", async ({
page,
@@ -31,5 +31,5 @@ test("TC: SALEOR_9 User should be able to navigate to draft list as a staff memb
await mainMenuPage.openDrafts();
await expect(draftOrdersPage.createDraftOrderButton).toBeVisible();
await basePage.expectGridToBeAttached();
- await mainMenuPage.expectMenuItemsCount(3);
+ await mainMenuPage.expectMenuItemsCount(4);
});
diff --git a/playwright/tests/singlePermissions/plugins.spec.ts b/playwright/tests/singlePermissions/plugins.spec.ts
index 42e48bae565..804ac33eee6 100644
--- a/playwright/tests/singlePermissions/plugins.spec.ts
+++ b/playwright/tests/singlePermissions/plugins.spec.ts
@@ -16,5 +16,5 @@ test("TC: SALEOR_16 User should be able to navigate to plugin list as a staff me
await page.goto(URL_LIST.configuration);
await configurationPage.openPlugins();
await expect(pluginsPage.pluginRow.first()).toBeVisible();
- await mainMenuPage.expectMenuItemsCount(2);
+ await mainMenuPage.expectMenuItemsCount(3);
});
diff --git a/playwright/tests/singlePermissions/product.spec.ts b/playwright/tests/singlePermissions/product.spec.ts
index 848884bbc90..a2114a1c6b2 100644
--- a/playwright/tests/singlePermissions/product.spec.ts
+++ b/playwright/tests/singlePermissions/product.spec.ts
@@ -18,7 +18,7 @@ test("TC: SALEOR_23 User should be able to navigate to product list as a staff m
await page.goto(URL_LIST.homePage);
await mainMenuPage.openProducts();
await expect(productPage.addProductButton).toBeVisible();
- await mainMenuPage.expectMenuItemsCount(5);
+ await mainMenuPage.expectMenuItemsCount(6);
await basePage.expectGridToBeAttached();
});
test("TC: SALEOR_24 User should be able to navigate to collections list as a staff member using PRODUCT permission @e2e", async ({
@@ -31,7 +31,7 @@ test("TC: SALEOR_24 User should be able to navigate to collections list as a sta
await page.goto(URL_LIST.homePage);
await mainMenuPage.openCollections();
await expect(collectionsPage.createCollectionButton).toBeVisible();
- await mainMenuPage.expectMenuItemsCount(5);
+ await mainMenuPage.expectMenuItemsCount(6);
await basePage.expectGridToBeAttached();
});
test("TC: SALEOR_25 User should be able to navigate to categories list as a staff member using PRODUCT permission @e2e", async ({
@@ -44,6 +44,6 @@ test("TC: SALEOR_25 User should be able to navigate to categories list as a staf
await page.goto(URL_LIST.homePage);
await mainMenuPage.openCategories();
await expect(categoriesPage.createCategoryButton).toBeVisible();
- await mainMenuPage.expectMenuItemsCount(5);
+ await mainMenuPage.expectMenuItemsCount(6);
await basePage.expectGridToBeAttached();
});
diff --git a/playwright/tests/singlePermissions/productType.spec.ts b/playwright/tests/singlePermissions/productType.spec.ts
index b1a35b4c5ce..b69122953c9 100644
--- a/playwright/tests/singlePermissions/productType.spec.ts
+++ b/playwright/tests/singlePermissions/productType.spec.ts
@@ -16,5 +16,5 @@ test("TC: SALEOR_17 User should be able to navigate to product type list as a st
await page.goto(URL_LIST.configuration);
await configurationPage.openProductTypes();
await expect(productTypePage.addProductTypeButton).toBeVisible();
- await mainMenuPage.expectMenuItemsCount(2);
+ await mainMenuPage.expectMenuItemsCount(3);
});
diff --git a/playwright/tests/singlePermissions/settingsConfiguration.spec.ts b/playwright/tests/singlePermissions/settingsConfiguration.spec.ts
index 121aa400d35..ec30d4b6d46 100644
--- a/playwright/tests/singlePermissions/settingsConfiguration.spec.ts
+++ b/playwright/tests/singlePermissions/settingsConfiguration.spec.ts
@@ -17,5 +17,5 @@ test("TC: SALEOR_18 User should be able to navigate to configuration as a staff
await mainMenuPage.openConfiguration();
await configurationPage.openSiteSettings();
await expect(siteSettingsPage.companyInfoSection).toBeVisible();
- await mainMenuPage.expectMenuItemsCount(2);
+ await mainMenuPage.expectMenuItemsCount(3);
});
diff --git a/playwright/tests/singlePermissions/shipping.spec.ts b/playwright/tests/singlePermissions/shipping.spec.ts
index 2988e9f5dec..6781edb933e 100644
--- a/playwright/tests/singlePermissions/shipping.spec.ts
+++ b/playwright/tests/singlePermissions/shipping.spec.ts
@@ -17,5 +17,5 @@ test("TC: SALEOR_21 User should be able to navigate to shipping zones page as a
await page.waitForTimeout(8000);
await configurationPage.openShippingMethods();
await expect(shippingMethodsPage.createShippingZoneButton).toBeVisible();
- await mainMenuPage.expectMenuItemsCount(2);
+ await mainMenuPage.expectMenuItemsCount(3);
});
diff --git a/playwright/tests/singlePermissions/staffMembers.spec.ts b/playwright/tests/singlePermissions/staffMembers.spec.ts
index cc22d7f9c6d..96c3d4fd55f 100644
--- a/playwright/tests/singlePermissions/staffMembers.spec.ts
+++ b/playwright/tests/singlePermissions/staffMembers.spec.ts
@@ -20,7 +20,7 @@ test("TC: SALEOR_19 User should be able to navigate to staff members list page a
await page.goto(URL_LIST.configuration);
await configurationPage.openStaffMembers();
await expect(staffMembersPage.inviteStaffMembersButton).toBeVisible();
- await mainMenuPage.expectMenuItemsCount(2);
+ await mainMenuPage.expectMenuItemsCount(3);
await basePage.expectGridToBeAttached();
});
@@ -35,6 +35,6 @@ test("TC: SALEOR_20 User should be able to navigate to permission group list pag
await page.goto(URL_LIST.configuration);
await configurationPage.openPermissionGroups();
await expect(permissionGroupsPage.createPermissionGroupButton).toBeVisible();
- await mainMenuPage.expectMenuItemsCount(2);
+ await mainMenuPage.expectMenuItemsCount(3);
await basePage.expectGridToBeAttached();
});
diff --git a/playwright/tests/singlePermissions/translations.spec.ts b/playwright/tests/singlePermissions/translations.spec.ts
index 83054e565e7..61dfed0a0e4 100644
--- a/playwright/tests/singlePermissions/translations.spec.ts
+++ b/playwright/tests/singlePermissions/translations.spec.ts
@@ -14,5 +14,5 @@ test("TC: SALEOR_22 User should be able to navigate to translations page as a st
await page.goto(URL_LIST.homePage);
await mainMenuPage.openTranslations();
await expect(basePage.pageHeader).toHaveText("Languages");
- await mainMenuPage.expectMenuItemsCount(2);
+ await mainMenuPage.expectMenuItemsCount(3);
});
diff --git a/src/apps/apps-routing.tsx b/src/apps/apps-routing.tsx
index b4424e70d51..edb46949f4e 100644
--- a/src/apps/apps-routing.tsx
+++ b/src/apps/apps-routing.tsx
@@ -2,6 +2,8 @@ import {
AppDetailsUrlQueryParams,
AppInstallUrlQueryParams,
} from "@dashboard/apps/urls";
+import SectionRoute from "@dashboard/auth/components/SectionRoute";
+import { PermissionEnum } from "@dashboard/graphql";
import { sectionNames } from "@dashboard/intl";
import { parse as parseQs } from "qs";
import React from "react";
@@ -55,8 +57,9 @@ export const AppsSectionRoot = () => {
-
@@ -65,8 +68,9 @@ export const AppsSectionRoot = () => {
path={AppPaths.resolveAppDetailsPath(":id")}
component={AppManageRoute}
/>
-
diff --git a/src/apps/components/AllAppList/AllAppList.tsx b/src/apps/components/AllAppList/AllAppList.tsx
index 636704746c5..9c349df91be 100644
--- a/src/apps/components/AllAppList/AllAppList.tsx
+++ b/src/apps/components/AllAppList/AllAppList.tsx
@@ -1,8 +1,7 @@
import { AppstoreApi } from "@dashboard/apps/appstore.types";
import { AppInstallationFragment } from "@dashboard/graphql";
import { Skeleton } from "@material-ui/lab";
-import { Box } from "@saleor/macaw-ui-next";
-import chunk from "lodash/chunk";
+import { Box, useTheme } from "@saleor/macaw-ui-next";
import React from "react";
import AppListRow from "../AppListRow";
@@ -20,18 +19,24 @@ const AllAppList: React.FC = ({
navigateToAppInstallPage,
navigateToGithubForkPage,
}) => {
- const appsPairs = React.useMemo(() => chunk(appList, 2), [appList]);
+ const { themeValues } = useTheme();
if (!appList) {
return ;
}
return (
-
- {appsPairs.map(appPair => (
+
+ {appList.map(app => (
= ({
onAppDeactivateOpen,
onAppDeleteOpen,
}) => {
- const classes = useStyles();
+ const intl = useIntl();
+ const { hasManagedAppsPermission } = useHasManagedAppsPermission();
+
+ const tooltipContent = !hasManagedAppsPermission
+ ? intl.formatMessage(buttonMessages.noPermission)
+ : undefined;
return (
= ({
borderColor="default1"
borderBottomWidth={1}
>
-