MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / add_user

Method add_user

web/setup.py:321–341  ·  view source on GitHub ↗

Add Internal user.

(email: str, password: str,
                 admin: Annotated[Optional[bool],
                                  typer.Option("--admin")] = False,
                 role: Optional[str] = None,
                 active: Annotated[Optional[bool],
                                   typer.Option("--active/--inactive")] = True,
                 console: Optional[bool] = True,
                 json: Optional[bool] = False,
                 sqlite_path: Optional[str] = None,
                 )

Source from the content-addressed store, hash-verified

319 @app.command()
320 @update_sqlite_path
321 def add_user(email: str, password: str,
322 admin: Annotated[Optional[bool],
323 typer.Option("--admin")] = False,
324 role: Optional[str] = None,
325 active: Annotated[Optional[bool],
326 typer.Option("--active/--inactive")] = True,
327 console: Optional[bool] = True,
328 json: Optional[bool] = False,
329 sqlite_path: Optional[str] = None,
330 ):
331 """Add Internal user. """
332
333 data = {
334 'email': email,
335 'role': 'Administrator' if admin else role,
336 'active': active,
337 'auth_source': INTERNAL,
338 'newPassword': password,
339 'confirmPassword': password,
340 }
341 ManageUsers.create_user(data, console, json)
342
343 @app.command()
344 @update_sqlite_path

Callers

nothing calls this directly

Calls 1

create_userMethod · 0.80

Tested by

no test coverage detected