# Add a setting to prevent sharing projects in public channels \(\#41395\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/e604ef3af914b249867058e4f11e045e38dfee88)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: e604ef3af914b249867058e4f11e045e38dfee88

Requested commit: e604ef3af914b249867058e4f11e045e38dfee88

Commit: e604ef3af914b249867058e4f11e045e38dfee88

Tree: 509ccede1e41f80011f65c22b4462c6240e5254e

Author: Marshall Bowers

Committer: GitHub

## Message

````
Add a setting to prevent sharing projects in public channels (#41395)

This PR adds a setting to prevent projects from being shared in public
channels.

This can be enabled by adding the following to the project settings
(`.zed/settings.json`):

```json
{
  "prevent_sharing_in_public_channels": true
}
```

This will then disable the "Share" button when not in a private channel:

<img width="380" height="115" alt="Screenshot 2025-10-28 at 2 28 10 PM"
src="https://github.com/user-attachments/assets/6761ac34-c0d5-4451-a443-adf7a1c42bcd"
/>

Release Notes:

- collaboration: Added a `prevent_sharing_in_public_channels` project
setting for preventing projects from being shared in public channels.
````

## Parents

- [1f5101d9fda8e31d048b797c32f74151a94bed31](https://git.cafe/gitcafe/zed/commit/1f5101d9fda8e31d048b797c32f74151a94bed31?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/e604ef3af914b249867058e4f11e045e38dfee88?format=markdown)
