Skip to content

Commit d351e1d

Browse files
committed
chore: typegen and ruff
1 parent cf69418 commit d351e1d

2 files changed

Lines changed: 21 additions & 3 deletions

File tree

invokeai/app/api/routers/auth.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,17 @@ async def get_setup_status() -> SetupStatusResponse:
9393

9494
# If multiuser is disabled, setup is never required
9595
if not config.multiuser:
96-
return SetupStatusResponse(setup_required=False, multiuser_enabled=False, strict_password_checking=config.strict_password_checking)
96+
return SetupStatusResponse(
97+
setup_required=False, multiuser_enabled=False, strict_password_checking=config.strict_password_checking
98+
)
9799

98100
# In multiuser mode, check if an admin exists
99101
user_service = ApiDependencies.invoker.services.users
100102
setup_required = not user_service.has_admin()
101103

102-
return SetupStatusResponse(setup_required=setup_required, multiuser_enabled=True, strict_password_checking=config.strict_password_checking)
104+
return SetupStatusResponse(
105+
setup_required=setup_required, multiuser_enabled=True, strict_password_checking=config.strict_password_checking
106+
)
103107

104108

105109
@auth_router.post("/login", response_model=LoginResponse)
@@ -513,6 +517,8 @@ async def update_current_user(
513517
display_name=request.display_name,
514518
password=request.new_password,
515519
)
516-
return user_service.update(current_user.user_id, changes, strict_password_checking=config.strict_password_checking)
520+
return user_service.update(
521+
current_user.user_id, changes, strict_password_checking=config.strict_password_checking
522+
)
517523
except ValueError as e:
518524
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=str(e)) from e

invokeai/frontend/web/src/services/api/schema.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14375,6 +14375,7 @@ export type components = {
1437514375
* unsafe_disable_picklescan: UNSAFE. Disable the picklescan security check during model installation. Recommended only for development and testing purposes. This will allow arbitrary code execution during model installation, so should never be used in production.
1437614376
* allow_unknown_models: Allow installation of models that we are unable to identify. If enabled, models will be marked as `unknown` in the database, and will not have any metadata associated with them. If disabled, unknown models will be rejected during installation.
1437714377
* multiuser: Enable multiuser support. When disabled, the application runs in single-user mode using a default system account with administrator privileges. When enabled, requires user authentication and authorization.
14378+
* strict_password_checking: Enforce strict password requirements. When True, passwords must contain uppercase, lowercase, and numbers. When False (default), any password is accepted but its strength is reported to the user.
1437814379
*/
1437914380
InvokeAIAppConfig: {
1438014381
/**
@@ -14748,6 +14749,12 @@ export type components = {
1474814749
* @default false
1474914750
*/
1475014751
multiuser?: boolean;
14752+
/**
14753+
* Strict Password Checking
14754+
* @description Enforce strict password requirements. When True, passwords must contain uppercase, lowercase, and numbers. When False (default), any password is accepted but its strength (weak/moderate/strong) is reported to the user.
14755+
* @default false
14756+
*/
14757+
strict_password_checking?: boolean;
1475114758
};
1475214759
/**
1475314760
* InvokeAIAppConfigWithSetFields
@@ -24486,6 +24493,11 @@ export type components = {
2448624493
* @description Whether multiuser mode is enabled
2448724494
*/
2448824495
multiuser_enabled: boolean;
24496+
/**
24497+
* Strict Password Checking
24498+
* @description Whether strict password requirements are enforced
24499+
*/
24500+
strict_password_checking: boolean;
2448924501
};
2449024502
/**
2449124503
* Show Image

0 commit comments

Comments
 (0)