(file_path, json_object)
| 364 | |
| 365 | |
| 366 | def read_short(file_path, json_object): |
| 367 | name = _read_name(file_path, json_object) |
| 368 | allowed_users = json_object.get('allowed_users') |
| 369 | admin_users = json_object.get('admin_users') |
| 370 | group = read_str_from_config(json_object, 'group', blank_to_none=True) |
| 371 | |
| 372 | hidden = read_bool_from_config('hidden', json_object, default=False) |
| 373 | if hidden: |
| 374 | return None |
| 375 | |
| 376 | if allowed_users is None: |
| 377 | allowed_users = ANY_USER |
| 378 | elif (allowed_users == '*') or ('*' in allowed_users): |
| 379 | allowed_users = ANY_USER |
| 380 | |
| 381 | if admin_users is None: |
| 382 | admin_users = ANY_USER |
| 383 | elif (admin_users == '*') or ('*' in admin_users): |
| 384 | admin_users = ANY_USER |
| 385 | |
| 386 | return ShortConfig(name=name, group=group, allowed_users=allowed_users, admin_users=admin_users) |
| 387 | |
| 388 | |
| 389 | class ParameterNotFoundException(Exception): |
no test coverage detected