fix: Viewers unable to connect personal Slack (#9614)

This commit is contained in:
Tom Moor
2025-07-11 17:41:59 -04:00
committed by GitHub
parent 066b6dab43
commit 928ec064ee
2 changed files with 4 additions and 7 deletions
+3 -4
View File
@@ -16,8 +16,7 @@ import {
PlusIcon,
InternetIcon,
} from "outline-icons";
import { ComponentProps } from "react";
import * as React from "react";
import { ComponentProps, useEffect } from "react";
import { useTranslation } from "react-i18next";
import { integrationSettingsPath } from "@shared/utils/routeHelpers";
import { Integrations } from "~/scenes/Settings/Integrations";
@@ -65,7 +64,7 @@ const useSettingsConfig = () => {
const can = usePolicy(team);
const { t } = useTranslation();
React.useEffect(() => {
useEffect(() => {
void integrations.fetchAll();
}, [integrations]);
@@ -213,7 +212,7 @@ const useSettingsConfig = () => {
name: `${t("Install")}`,
path: settingsPath("integrations"),
component: Integrations,
enabled: true,
enabled: can.update,
group: t("Integrations"),
icon: PlusIcon,
},
+1 -3
View File
@@ -1,4 +1,3 @@
import { UserRole } from "@shared/types";
import { createLazyComponent } from "~/components/LazyLoad";
import { Hook, PluginManager } from "~/utils/PluginManager";
import config from "../plugin.json";
@@ -14,8 +13,7 @@ PluginManager.add([
description:
"Search your knowledge base directly in Slack, get /outline search, rich link previews, and notifications on new or updated docs.",
component: createLazyComponent(() => import("./Settings")),
enabled: (_, user) =>
[UserRole.Member, UserRole.Admin].includes(user.role),
enabled: () => true,
},
},
{