Skip to content
This repository was archived by the owner on May 19, 2026. It is now read-only.

Admin can disable public sharing - #135

Merged
Vito0912 merged 1 commit into
Vito0912:personalfrom
normanalie:disable-public-sharing
Apr 24, 2026
Merged

Vito0912 merged 1 commit into
Vito0912:personalfrom
normanalie:disable-public-sharing

Conversation

@normanalie

Copy link
Copy Markdown

Still with the goal of using Forkmost in a business setting, this small PR disables the ability for all users to publicly share a document.

  • Add a toggle to disable public sharing
  • Existing links become inactive (404) when disabled and become active again when sharing is re-enable
  • Only admin and owners can activate/deactivate public sharing

This pull request introduces a workspace-level control to enable or disable public sharing of pages. Admin users can now toggle this setting from the workspace sharing settings page, which disables all existing shared links when turned off. The UI and backend have been updated to support this feature, and conditional rendering ensures non-admins and users in disabled workspaces see appropriate messaging. Some minor code style and formatting improvements are also included.

Workspace Public Sharing Control

  • Added a toggle in the workspace sharing settings (shares.tsx) for admins to enable or disable public sharing. When disabled, all existing shared links become inactive, and an alert is shown to users. The toggle is disabled for non-admins. [1] [2] [3]
  • Updated the backend to support disabling public sharing at the workspace level by storing this setting and removing shared links when disabled.

UI Logic & Conditional Rendering

  • Updated PageHeaderMenu to hide the share modal when public sharing is disabled at the workspace level. [1] [2] [3]
  • Displayed an alert on the sharing settings page when public sharing is disabled, explaining the impact to users.

Code Quality & Formatting

  • Improved code formatting and consistency in several server and type files, including better parameter formatting and type definitions. [1] [2] [3] [4] [5] [6] [7]
  • Minor UI code cleanups in PageHeaderMenu (e.g., consistent semicolon and bracket usage, whitespace fixes). [1] [2] [3]

- Add a toggle to disable public sharing
- Existing links become inactive when disabled
- Only admin and owners can activate/deactivate public sharing
@Vito0912

Copy link
Copy Markdown
Owner

Thanks!

@Vito0912
Vito0912 merged commit 308f7ed into Vito0912:personal Apr 24, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants