Skip to content

feat: add organization scope for shared ports #18314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Jun 16, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
do the thing
  • Loading branch information
aslilac committed Jun 11, 2025
commit e04084eb47ade44d4d16eaeaca84a23065a70de4
1 change: 1 addition & 0 deletions site/src/modules/resources/PortForwardButton.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const meta: Meta<typeof PortForwardButton> = {
component: PortForwardButton,
decorators: [withDashboardProvider],
args: {
host: "*.coder.com",
agent: MockWorkspaceAgent,
workspace: MockWorkspace,
template: MockTemplate,
Expand Down
49 changes: 32 additions & 17 deletions site/src/modules/resources/PortForwardButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import MenuItem from "@mui/material/MenuItem";
import Select from "@mui/material/Select";
import Stack from "@mui/material/Stack";
import TextField from "@mui/material/TextField";
import MUITooltip from "@mui/material/Tooltip";
import { API } from "api/api";
import {
deleteWorkspacePortShare,
Expand Down Expand Up @@ -223,25 +222,41 @@ export const PortForwardPopoverView: FC<PortForwardPopoverViewProps> = ({
})();

const disabledPublicMenuItem = (
<MUITooltip title="This workspace template does not allow sharing ports with unauthenticated users.">
{/* Tooltips don't work directly on disabled MenuItem components so you must wrap in div. */}
<div>
<MenuItem value="public" disabled>
Public
</MenuItem>
</div>
</MUITooltip>
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
{/* Tooltips don't work directly on disabled MenuItem components so you must wrap in div. */}
<div>
<MenuItem value="public" disabled>
Public
</MenuItem>
</div>
</TooltipTrigger>
<TooltipContent>
This workspace template does not allow sharing ports with
unauthenticated users.
</TooltipContent>
</Tooltip>
</TooltipProvider>
);

const disabledOrganizationMenuItem = (
<MUITooltip title="This workspace template does not allow sharing ports at the organization level.">
{/* Tooltips don't work directly on disabled MenuItem components so you must wrap in div. */}
<div>
<MenuItem value="organization" disabled>
Organization
</MenuItem>
</div>
</MUITooltip>
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
{/* Tooltips don't work directly on disabled MenuItem components so you must wrap in div. */}
<div>
<MenuItem value="organization" disabled>
Organization
</MenuItem>
</div>
</TooltipTrigger>
<TooltipContent>
This workspace template does not allow sharing ports at the
organization level.
</TooltipContent>
</Tooltip>
</TooltipProvider>
);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const meta: Meta<typeof PortForwardPopoverView> = {
template: MockTemplate,
workspace: MockWorkspace,
portSharingControlsEnabled: true,
host: "coder.com",
host: "*.coder.com",
},
};

Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy