MCPcopy Create free account
hub / github.com/bugy/script-server / create_failed_short_config

Function create_failed_short_config

src/model/script_config.py:36–44  ·  view source on GitHub ↗
(path, has_admin_rights)

Source from the content-addressed store, hash-verified

34
35
36def create_failed_short_config(path, has_admin_rights):
37 name = _build_name_from_path(path)
38 if not has_admin_rights:
39 file_content = file_utils.read_file(path)
40 if '"allowed_users"' in file_content:
41 restricted_name = name[:2] + '...' + name[-2:]
42 name = restricted_name + ' (restricted)'
43
44 return ShortConfig(name=name, parsing_failed=True)
45
46
47@observable_fields(

Callers 2

load_scriptMethod · 0.90
find_and_loadMethod · 0.90

Calls 2

_build_name_from_pathFunction · 0.85
ShortConfigClass · 0.85

Tested by

no test coverage detected