mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-05 18:38:17 -05:00
feat: add permission toggle for public sharing of notes
This commit introduces a new permission toggle that allows administrators to control whether users can publicly share their notes. - Adds a new environment variable `USER_PERMISSIONS_NOTES_ALLOW_PUBLIC_SHARING` to control the default setting. - Adds a `public_notes` permission to the `sharing` section of the user permissions. - Adds a toggle switch to the admin panel for managing this permission. - Implements backend logic to enforce the permission when a user attempts to share a note publicly.
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
public_models: false,
|
||||
public_knowledge: false,
|
||||
public_prompts: false,
|
||||
public_tools: false
|
||||
public_tools: false,
|
||||
public_notes: false
|
||||
},
|
||||
chat: {
|
||||
controls: true,
|
||||
@@ -247,6 +248,13 @@
|
||||
</div>
|
||||
<Switch bind:state={permissions.sharing.public_tools} />
|
||||
</div>
|
||||
|
||||
<div class=" flex w-full justify-between my-2 pr-2">
|
||||
<div class=" self-center text-xs font-medium">
|
||||
{$i18n.t('Notes Public Sharing')}
|
||||
</div>
|
||||
<Switch bind:state={permissions.sharing.public_notes} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class=" border-gray-100 dark:border-gray-850 my-2" />
|
||||
|
||||
Reference in New Issue
Block a user