mirror of
https://github.com/outline/outline.git
synced 2026-11-30 00:50:41 +03:00
fix: Remove disabled public sharing control for those without access
This commit is contained in:
1 parent
5812bdfe65
commit
4fd00f7b97
1 file changed
+3
-1
@@ -16,6 +16,7 @@ import Text from "~/components/Text";
|
||||
import useCurrentTeam from "~/hooks/useCurrentTeam";
|
||||
import useCurrentUser from "~/hooks/useCurrentUser";
|
||||
import useKeyDown from "~/hooks/useKeyDown";
|
||||
import usePolicy from "~/hooks/usePolicy";
|
||||
import useRequest from "~/hooks/useRequest";
|
||||
import useStores from "~/hooks/useStores";
|
||||
import { documentPath, urlify } from "~/utils/routeHelpers";
|
||||
@@ -68,6 +69,7 @@ function SharePopover({
|
||||
const user = useCurrentUser();
|
||||
const team = useCurrentTeam();
|
||||
const { t } = useTranslation();
|
||||
const can = usePolicy(document);
|
||||
const timeout = React.useRef<ReturnType<typeof setTimeout>>();
|
||||
const buttonRef = React.useRef<HTMLButtonElement>(null);
|
||||
const collection = document.collection;
|
||||
@@ -177,7 +179,7 @@ function SharePopover({
|
||||
)}
|
||||
</DocumentMembersList>
|
||||
|
||||
{team.sharing && visible && (
|
||||
{team.sharing && visible && can.share && (
|
||||
<>
|
||||
<Separator />
|
||||
<Heading>{t("Public access")}</Heading>
|
||||
|
||||
Reference in new issue
Block a user