File tree Expand file tree Collapse file tree 4 files changed +52
-0
lines changed
components/admin/Users/Groups Expand file tree Collapse file tree 4 files changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -1385,6 +1385,18 @@ def reachable(host: str, port: int) -> bool:
13851385 == "true"
13861386)
13871387
1388+ USER_PERMISSIONS_WORKSPACE_SKILLS_ALLOW_SHARING = (
1389+ os .environ .get ("USER_PERMISSIONS_WORKSPACE_SKILLS_ALLOW_SHARING" , "False" ).lower ()
1390+ == "true"
1391+ )
1392+
1393+ USER_PERMISSIONS_WORKSPACE_SKILLS_ALLOW_PUBLIC_SHARING = (
1394+ os .environ .get (
1395+ "USER_PERMISSIONS_WORKSPACE_SKILLS_ALLOW_PUBLIC_SHARING" , "False"
1396+ ).lower ()
1397+ == "true"
1398+ )
1399+
13881400
13891401USER_PERMISSIONS_NOTES_ALLOW_SHARING = (
13901402 os .environ .get ("USER_PERMISSIONS_NOTES_ALLOW_SHARING" , "False" ).lower () == "true"
@@ -1543,6 +1555,8 @@ def reachable(host: str, port: int) -> bool:
15431555 "public_prompts" : USER_PERMISSIONS_WORKSPACE_PROMPTS_ALLOW_PUBLIC_SHARING ,
15441556 "tools" : USER_PERMISSIONS_WORKSPACE_TOOLS_ALLOW_SHARING ,
15451557 "public_tools" : USER_PERMISSIONS_WORKSPACE_TOOLS_ALLOW_PUBLIC_SHARING ,
1558+ "skills" : USER_PERMISSIONS_WORKSPACE_SKILLS_ALLOW_SHARING ,
1559+ "public_skills" : USER_PERMISSIONS_WORKSPACE_SKILLS_ALLOW_PUBLIC_SHARING ,
15461560 "notes" : USER_PERMISSIONS_NOTES_ALLOW_SHARING ,
15471561 "public_notes" : USER_PERMISSIONS_NOTES_ALLOW_PUBLIC_SHARING ,
15481562 },
Original file line number Diff line number Diff line change @@ -190,6 +190,8 @@ class SharingPermissions(BaseModel):
190190 public_prompts : bool = False
191191 tools : bool = False
192192 public_tools : bool = True
193+ skills : bool = False
194+ public_skills : bool = False
193195 notes : bool = False
194196 public_notes : bool = True
195197
Original file line number Diff line number Diff line change 324324 </div >
325325 {/if }
326326
327+ <div class =" flex flex-col w-full" >
328+ <div class =" flex w-full justify-between my-1" >
329+ <div class =" self-center text-xs font-medium" >
330+ {$i18n .t (' Skills Sharing' )}
331+ </div >
332+ <Switch bind:state ={permissions .sharing .skills } />
333+ </div >
334+ {#if defaultPermissions ?.sharing ?.skills && ! permissions .sharing .skills }
335+ <div >
336+ <div class =" text-xs text-gray-500" >
337+ {$i18n .t (' This is a default user permission and will remain enabled.' )}
338+ </div >
339+ </div >
340+ {/if }
341+ </div >
342+
343+ {#if permissions .sharing .skills }
344+ <div class =" flex flex-col w-full" >
345+ <div class =" flex w-full justify-between my-1" >
346+ <div class =" self-center text-xs font-medium" >
347+ {$i18n .t (' Skills Public Sharing' )}
348+ </div >
349+ <Switch bind:state ={permissions .sharing .public_skills } />
350+ </div >
351+ {#if defaultPermissions ?.sharing ?.public_skills && ! permissions .sharing .public_skills }
352+ <div >
353+ <div class =" text-xs text-gray-500" >
354+ {$i18n .t (' This is a default user permission and will remain enabled.' )}
355+ </div >
356+ </div >
357+ {/if }
358+ </div >
359+ {/if }
360+
327361 <div class =" flex flex-col w-full" >
328362 <div class =" flex w-full justify-between my-1" >
329363 <div class =" self-center text-xs font-medium" >
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ export const DEFAULT_PERMISSIONS = {
2121 public_prompts : false ,
2222 tools : false ,
2323 public_tools : false ,
24+ skills : false ,
25+ public_skills : false ,
2426 notes : false ,
2527 public_notes : false
2628 } ,
You can’t perform that action at this time.
0 commit comments