(path, has_admin_rights)
| 34 | |
| 35 | |
| 36 | def 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( |
no test coverage detected