fractal-server 2.4.0a0__tar.gz → 2.4.0a1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/PKG-INFO +1 -1
- fractal_server-2.4.0a1/fractal_server/__init__.py +1 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/auth/group.py +8 -22
- fractal_server-2.4.0a1/fractal_server/app/routes/auth/users.py +173 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/user.py +5 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/security/__init__.py +0 -7
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/pyproject.toml +2 -2
- fractal_server-2.4.0a0/fractal_server/__init__.py +0 -1
- fractal_server-2.4.0a0/fractal_server/app/routes/auth/users.py +0 -103
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/LICENSE +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/README.md +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/__main__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/alembic.ini +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/db/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/linkusergroup.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/linkuserproject.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/security.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v1/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v1/dataset.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v1/job.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v1/project.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v1/state.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v1/task.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v1/workflow.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v2/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v2/collection_state.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v2/dataset.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v2/job.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v2/project.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v2/task.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v2/workflow.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v2/workflowtask.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/admin/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/admin/v1.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/admin/v2.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/_aux_functions.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/dataset.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/job.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/project.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/task.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/task_collection.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/workflow.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/workflowtask.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/_aux_functions.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/dataset.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/images.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/job.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/project.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/status.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/submit.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/task.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/task_collection.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/task_collection_custom.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/task_legacy.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/workflow.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/workflowtask.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/auth/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/auth/_aux_auth.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/auth/current_user.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/auth/group_names.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/auth/login.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/auth/oauth.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/auth/register.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/auth/router.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/aux/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/aux/_job.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/aux/_runner.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/.gitignore +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/async_wrap.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/components.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/compress_folder.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/exceptions.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/slurm/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/slurm/_batching.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/slurm/_slurm_config.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/slurm/remote.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/slurm/ssh/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/slurm/ssh/_executor_wait_thread.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/slurm/ssh/_slurm_job.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/slurm/ssh/executor.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/slurm/sudo/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/slurm/sudo/_check_jobs_status.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/slurm/sudo/_executor_wait_thread.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/slurm/sudo/_subprocess_run_as_user.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/slurm/sudo/executor.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/extract_archive.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/filenames.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/run_subprocess.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/set_start_and_last_task_index.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/shutdown.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/task_files.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v1/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v1/_common.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v1/_local/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v1/_local/_local_config.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v1/_local/_submit_setup.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v1/_local/executor.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v1/_slurm/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v1/_slurm/_submit_setup.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v1/_slurm/get_slurm_config.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v1/common.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v1/handle_failed_job.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/_local/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/_local/_local_config.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/_local/_submit_setup.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/_local/executor.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/_local_experimental/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/_local_experimental/_local_config.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/_local_experimental/_submit_setup.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/_local_experimental/executor.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/_slurm_common/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/_slurm_common/get_slurm_config.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/_slurm_ssh/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/_slurm_ssh/_submit_setup.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/_slurm_sudo/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/_slurm_sudo/_submit_setup.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/deduplicate_list.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/handle_failed_job.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/merge_outputs.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/runner.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/runner_functions.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/runner_functions_low_level.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/task_interface.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/v2/v1_compat.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/versions.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/_validators.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/user_group.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v1/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v1/applyworkflow.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v1/dataset.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v1/dumps.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v1/manifest.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v1/project.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v1/state.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v1/task.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v1/task_collection.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v1/workflow.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v2/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v2/dataset.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v2/dumps.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v2/job.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v2/manifest.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v2/project.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v2/status.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v2/task.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v2/task_collection.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v2/workflow.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/schemas/v2/workflowtask.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/config.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/data_migrations/2_4_0.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/data_migrations/README.md +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/gunicorn_fractal.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/images/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/images/models.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/images/tools.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/logger.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/main.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/README +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/env.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/script.py.mako +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/091b01f51f88_add_usergroup_and_linkusergroup_table.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/4c308bcaea2b_add_task_args_schema_and_task_args_.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/4cedeb448a53_workflowtask_foreign_keys_not_nullables.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/50a13d6138fd_initial_schema.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/5bf02391cfef_v2.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/70e77f1c38b0_add_applyworkflow_first_task_index_and_.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/71eefd1dd202_add_slurm_accounts.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/84bf0fffde30_add_dumps_to_applyworkflow.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/8f79bd162e35_add_docs_info_and_docs_link_to_task_.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/97f444d47249_add_applyworkflow_project_dump.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/99ea79d9e5d2_add_dataset_history.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/9fd26a2b0de4_add_workflow_timestamp_created.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/a7f4d6137b53_add_workflow_dump_to_applyworkflow.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/d4fe3708d309_make_applyworkflow_workflow_dump_non_.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/e75cac726012_make_applyworkflow_start_timestamp_not_.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/efa89c30e0a4_add_project_timestamp_created.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/migrations/versions/f384e1c0cf5d_drop_task_default_args_columns.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/py.typed +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/ssh/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/ssh/_fabric.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/string_tools.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/syringe.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/utils.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v1/_TaskCollectPip.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v1/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v1/background_operations.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v1/endpoint_operations.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v1/get_collection_data.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v1/utils.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v2/_TaskCollectPip.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v2/__init__.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v2/_venv_pip.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v2/background_operations.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v2/background_operations_ssh.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v2/endpoint_operations.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v2/templates/_1_create_venv.sh +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v2/templates/_2_upgrade_pip.sh +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v2/templates/_3_pip_install.sh +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v2/templates/_4_pip_freeze.sh +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v2/templates/_5_pip_show.sh +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/tasks/v2/utils.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/urls.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/utils.py +0 -0
- {fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/zip_tools.py +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
__VERSION__ = "2.4.0a1"
|
@@ -7,6 +7,7 @@ from fastapi import HTTPException
|
|
7
7
|
from fastapi import status
|
8
8
|
from sqlalchemy.ext.asyncio import AsyncSession
|
9
9
|
from sqlmodel import col
|
10
|
+
from sqlmodel import func
|
10
11
|
from sqlmodel import select
|
11
12
|
|
12
13
|
from . import current_active_superuser
|
@@ -19,7 +20,6 @@ from fractal_server.app.models import LinkUserGroup
|
|
19
20
|
from fractal_server.app.models import UserGroup
|
20
21
|
from fractal_server.app.models import UserOAuth
|
21
22
|
|
22
|
-
|
23
23
|
router_group = APIRouter()
|
24
24
|
|
25
25
|
|
@@ -31,9 +31,6 @@ async def get_list_user_groups(
|
|
31
31
|
user: UserOAuth = Depends(current_active_superuser),
|
32
32
|
db: AsyncSession = Depends(get_async_db),
|
33
33
|
) -> list[UserGroupRead]:
|
34
|
-
"""
|
35
|
-
FIXME docstring
|
36
|
-
"""
|
37
34
|
|
38
35
|
# Get all groups
|
39
36
|
stm_all_groups = select(UserGroup)
|
@@ -46,7 +43,8 @@ async def get_list_user_groups(
|
|
46
43
|
res = await db.execute(stm_all_links)
|
47
44
|
links = res.scalars().all()
|
48
45
|
|
49
|
-
#
|
46
|
+
# TODO: possible optimizations for this construction are listed in
|
47
|
+
# https://github.com/fractal-analytics-platform/fractal-server/issues/1742
|
50
48
|
for ind, group in enumerate(groups):
|
51
49
|
groups[ind] = dict(
|
52
50
|
group.model_dump(),
|
@@ -68,9 +66,6 @@ async def get_single_user_group(
|
|
68
66
|
user: UserOAuth = Depends(current_active_superuser),
|
69
67
|
db: AsyncSession = Depends(get_async_db),
|
70
68
|
) -> UserGroupRead:
|
71
|
-
"""
|
72
|
-
FIXME docstring
|
73
|
-
"""
|
74
69
|
group = await _get_single_group_with_user_ids(group_id=group_id, db=db)
|
75
70
|
return group
|
76
71
|
|
@@ -85,9 +80,6 @@ async def create_single_group(
|
|
85
80
|
user: UserOAuth = Depends(current_active_superuser),
|
86
81
|
db: AsyncSession = Depends(get_async_db),
|
87
82
|
) -> UserGroupRead:
|
88
|
-
"""
|
89
|
-
FIXME docstring
|
90
|
-
"""
|
91
83
|
|
92
84
|
# Check that name is not already in use
|
93
85
|
existing_name_str = select(UserGroup).where(
|
@@ -119,24 +111,21 @@ async def update_single_group(
|
|
119
111
|
user: UserOAuth = Depends(current_active_superuser),
|
120
112
|
db: AsyncSession = Depends(get_async_db),
|
121
113
|
) -> UserGroupRead:
|
122
|
-
"""
|
123
|
-
FIXME docstring
|
124
|
-
"""
|
125
114
|
|
126
115
|
# Check that all required users exist
|
127
116
|
# Note: The reason for introducing `col` is as in
|
128
117
|
# https://sqlmodel.tiangolo.com/tutorial/where/#type-annotations-and-errors,
|
129
|
-
stm = select(
|
118
|
+
stm = select(func.count()).where(
|
130
119
|
col(UserOAuth.id).in_(group_update.new_user_ids)
|
131
120
|
)
|
132
121
|
res = await db.execute(stm)
|
133
|
-
|
134
|
-
if
|
122
|
+
number_matching_users = res.scalar()
|
123
|
+
if number_matching_users != len(group_update.new_user_ids):
|
135
124
|
raise HTTPException(
|
136
125
|
status_code=status.HTTP_404_NOT_FOUND,
|
137
126
|
detail=(
|
138
|
-
f"
|
139
|
-
"
|
127
|
+
f"Not all requested users (IDs {group_update.new_user_ids}) "
|
128
|
+
"exist."
|
140
129
|
),
|
141
130
|
)
|
142
131
|
|
@@ -161,9 +150,6 @@ async def delete_single_group(
|
|
161
150
|
user: UserOAuth = Depends(current_active_superuser),
|
162
151
|
db: AsyncSession = Depends(get_async_db),
|
163
152
|
) -> UserGroupRead:
|
164
|
-
"""
|
165
|
-
FIXME docstring
|
166
|
-
"""
|
167
153
|
raise HTTPException(
|
168
154
|
status_code=status.HTTP_405_METHOD_NOT_ALLOWED,
|
169
155
|
detail=(
|
@@ -0,0 +1,173 @@
|
|
1
|
+
"""
|
2
|
+
Definition of `/auth/users/` routes
|
3
|
+
"""
|
4
|
+
from fastapi import APIRouter
|
5
|
+
from fastapi import Depends
|
6
|
+
from fastapi import HTTPException
|
7
|
+
from fastapi import status
|
8
|
+
from fastapi_users import exceptions
|
9
|
+
from fastapi_users import schemas
|
10
|
+
from fastapi_users.router.common import ErrorCode
|
11
|
+
from sqlalchemy.ext.asyncio import AsyncSession
|
12
|
+
from sqlmodel import col
|
13
|
+
from sqlmodel import func
|
14
|
+
from sqlmodel import select
|
15
|
+
|
16
|
+
from . import current_active_superuser
|
17
|
+
from ...db import get_async_db
|
18
|
+
from ...schemas.user import UserRead
|
19
|
+
from ...schemas.user import UserUpdate
|
20
|
+
from ...schemas.user import UserUpdateWithNewGroupIds
|
21
|
+
from ._aux_auth import _get_single_user_with_group_ids
|
22
|
+
from fractal_server.app.models import LinkUserGroup
|
23
|
+
from fractal_server.app.models import UserGroup
|
24
|
+
from fractal_server.app.models import UserOAuth
|
25
|
+
from fractal_server.app.routes.auth._aux_auth import _user_or_404
|
26
|
+
from fractal_server.app.security import get_user_manager
|
27
|
+
from fractal_server.app.security import UserManager
|
28
|
+
|
29
|
+
router_users = APIRouter()
|
30
|
+
|
31
|
+
|
32
|
+
@router_users.get("/users/{user_id}/", response_model=UserRead)
|
33
|
+
async def get_user(
|
34
|
+
user_id: int,
|
35
|
+
group_ids: bool = True,
|
36
|
+
superuser: UserOAuth = Depends(current_active_superuser),
|
37
|
+
db: AsyncSession = Depends(get_async_db),
|
38
|
+
) -> UserRead:
|
39
|
+
user = await _user_or_404(user_id, db)
|
40
|
+
if group_ids:
|
41
|
+
user_with_group_ids = await _get_single_user_with_group_ids(user, db)
|
42
|
+
return user_with_group_ids
|
43
|
+
else:
|
44
|
+
return user
|
45
|
+
|
46
|
+
|
47
|
+
@router_users.patch("/users/{user_id}/", response_model=UserRead)
|
48
|
+
async def patch_user(
|
49
|
+
user_id: int,
|
50
|
+
user_update: UserUpdateWithNewGroupIds,
|
51
|
+
current_superuser: UserOAuth = Depends(current_active_superuser),
|
52
|
+
user_manager: UserManager = Depends(get_user_manager),
|
53
|
+
db: AsyncSession = Depends(get_async_db),
|
54
|
+
):
|
55
|
+
"""
|
56
|
+
Custom version of the PATCH-user route from `fastapi-users`.
|
57
|
+
|
58
|
+
In order to keep the fastapi-users logic in place (which is convenient to
|
59
|
+
update user attributes), we split the endpoint into two branches. We either
|
60
|
+
go through the fastapi-users-based attribute-update branch, or through the
|
61
|
+
branch where we establish new user/group relationships.
|
62
|
+
|
63
|
+
Note that we prevent making both changes at the same time, since it would
|
64
|
+
be more complex to guarantee that endpoint error would leave the database
|
65
|
+
in the same state as before the API call.
|
66
|
+
"""
|
67
|
+
|
68
|
+
# We prevent simultaneous editing of both user attributes and user/group
|
69
|
+
# associations
|
70
|
+
user_update_dict_without_groups = user_update.dict(
|
71
|
+
exclude_unset=True, exclude={"new_group_ids"}
|
72
|
+
)
|
73
|
+
edit_attributes = user_update_dict_without_groups != {}
|
74
|
+
edit_groups = user_update.new_group_ids is not None
|
75
|
+
if edit_attributes and edit_groups:
|
76
|
+
raise HTTPException(
|
77
|
+
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
|
78
|
+
detail=(
|
79
|
+
"Cannot modify both user attributes and group membership. "
|
80
|
+
"Please make two independent PATCH calls"
|
81
|
+
),
|
82
|
+
)
|
83
|
+
|
84
|
+
# Check that user exists
|
85
|
+
user_to_patch = await _user_or_404(user_id, db)
|
86
|
+
|
87
|
+
if edit_groups:
|
88
|
+
# Establish new user/group relationships
|
89
|
+
|
90
|
+
# Check that all required groups exist
|
91
|
+
# Note: The reason for introducing `col` is as in
|
92
|
+
# https://sqlmodel.tiangolo.com/tutorial/where/#type-annotations-and-errors,
|
93
|
+
stm = select(func.count()).where(
|
94
|
+
col(UserGroup.id).in_(user_update.new_group_ids)
|
95
|
+
)
|
96
|
+
res = await db.execute(stm)
|
97
|
+
number_matching_groups = res.scalar()
|
98
|
+
if number_matching_groups != len(user_update.new_group_ids):
|
99
|
+
raise HTTPException(
|
100
|
+
status_code=status.HTTP_404_NOT_FOUND,
|
101
|
+
detail=(
|
102
|
+
"Not all requested groups (IDs: "
|
103
|
+
f"{user_update.new_group_ids}) exist."
|
104
|
+
),
|
105
|
+
)
|
106
|
+
|
107
|
+
for new_group_id in user_update.new_group_ids:
|
108
|
+
link = LinkUserGroup(user_id=user_id, group_id=new_group_id)
|
109
|
+
db.add(link)
|
110
|
+
await db.commit()
|
111
|
+
|
112
|
+
patched_user = user_to_patch
|
113
|
+
|
114
|
+
elif edit_attributes:
|
115
|
+
# Modify user attributes
|
116
|
+
try:
|
117
|
+
user_update_without_groups = UserUpdate(
|
118
|
+
**user_update_dict_without_groups
|
119
|
+
)
|
120
|
+
user = await user_manager.update(
|
121
|
+
user_update_without_groups,
|
122
|
+
user_to_patch,
|
123
|
+
safe=False,
|
124
|
+
request=None,
|
125
|
+
)
|
126
|
+
patched_user = schemas.model_validate(UserOAuth, user)
|
127
|
+
except exceptions.InvalidPasswordException as e:
|
128
|
+
raise HTTPException(
|
129
|
+
status_code=status.HTTP_400_BAD_REQUEST,
|
130
|
+
detail={
|
131
|
+
"code": ErrorCode.UPDATE_USER_INVALID_PASSWORD,
|
132
|
+
"reason": e.reason,
|
133
|
+
},
|
134
|
+
)
|
135
|
+
else:
|
136
|
+
# Nothing to do, just continue
|
137
|
+
patched_user = user_to_patch
|
138
|
+
|
139
|
+
# Enrich user object with `group_ids` attribute
|
140
|
+
patched_user_with_group_ids = await _get_single_user_with_group_ids(
|
141
|
+
patched_user, db
|
142
|
+
)
|
143
|
+
|
144
|
+
return patched_user_with_group_ids
|
145
|
+
|
146
|
+
|
147
|
+
@router_users.get("/users/", response_model=list[UserRead])
|
148
|
+
async def list_users(
|
149
|
+
user: UserOAuth = Depends(current_active_superuser),
|
150
|
+
db: AsyncSession = Depends(get_async_db),
|
151
|
+
):
|
152
|
+
"""
|
153
|
+
Return list of all users
|
154
|
+
"""
|
155
|
+
stm = select(UserOAuth)
|
156
|
+
res = await db.execute(stm)
|
157
|
+
user_list = res.scalars().unique().all()
|
158
|
+
|
159
|
+
# Get all user/group links
|
160
|
+
stm_all_links = select(LinkUserGroup)
|
161
|
+
res = await db.execute(stm_all_links)
|
162
|
+
links = res.scalars().all()
|
163
|
+
|
164
|
+
# TODO: possible optimizations for this construction are listed in
|
165
|
+
# https://github.com/fractal-analytics-platform/fractal-server/issues/1742
|
166
|
+
for ind, user in enumerate(user_list):
|
167
|
+
user_list[ind] = dict(
|
168
|
+
user.model_dump(),
|
169
|
+
group_ids=[
|
170
|
+
link.group_id for link in links if link.user_id == user.id
|
171
|
+
],
|
172
|
+
)
|
173
|
+
return user_list
|
@@ -16,6 +16,7 @@ __all__ = (
|
|
16
16
|
"UserRead",
|
17
17
|
"UserUpdate",
|
18
18
|
"UserCreate",
|
19
|
+
"UserUpdateWithNewGroupIds",
|
19
20
|
)
|
20
21
|
|
21
22
|
|
@@ -102,6 +103,10 @@ class UserUpdateStrict(BaseModel, extra=Extra.forbid):
|
|
102
103
|
)
|
103
104
|
|
104
105
|
|
106
|
+
class UserUpdateWithNewGroupIds(UserUpdate):
|
107
|
+
new_group_ids: Optional[list[int]] = None
|
108
|
+
|
109
|
+
|
105
110
|
class UserCreate(schemas.BaseUserCreate):
|
106
111
|
"""
|
107
112
|
Schema for `User` creation.
|
@@ -43,7 +43,6 @@ from fastapi_users.exceptions import UserAlreadyExists
|
|
43
43
|
from fastapi_users.models import ID
|
44
44
|
from fastapi_users.models import OAP
|
45
45
|
from fastapi_users.models import UP
|
46
|
-
from sqlalchemy.exc import IntegrityError
|
47
46
|
from sqlalchemy.ext.asyncio import AsyncSession
|
48
47
|
from sqlalchemy.orm import selectinload
|
49
48
|
from sqlmodel import func
|
@@ -295,12 +294,6 @@ async def _create_first_user(
|
|
295
294
|
user = await user_manager.create(UserCreate(**kwargs))
|
296
295
|
logger.info(f"User {user.email} created")
|
297
296
|
|
298
|
-
except IntegrityError:
|
299
|
-
logger.warning(
|
300
|
-
f"Creation of user {email} failed with IntegrityError "
|
301
|
-
"(likely due to concurrent attempts from different workers)."
|
302
|
-
)
|
303
|
-
|
304
297
|
except UserAlreadyExists:
|
305
298
|
logger.warning(f"User {email} already exists")
|
306
299
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "fractal-server"
|
3
|
-
version = "2.4.
|
3
|
+
version = "2.4.0a1"
|
4
4
|
description = "Server component of the Fractal analytics platform"
|
5
5
|
authors = [
|
6
6
|
"Tommaso Comparin <tommaso.comparin@exact-lab.it>",
|
@@ -92,7 +92,7 @@ filterwarnings = [
|
|
92
92
|
]
|
93
93
|
|
94
94
|
[tool.bumpver]
|
95
|
-
current_version = "2.4.
|
95
|
+
current_version = "2.4.0a1"
|
96
96
|
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
|
97
97
|
commit_message = "bump version {old_version} -> {new_version}"
|
98
98
|
commit = true
|
@@ -1 +0,0 @@
|
|
1
|
-
__VERSION__ = "2.4.0a0"
|
@@ -1,103 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Definition of `/auth/users/` routes
|
3
|
-
"""
|
4
|
-
from fastapi import APIRouter
|
5
|
-
from fastapi import Depends
|
6
|
-
from fastapi import HTTPException
|
7
|
-
from fastapi import status
|
8
|
-
from fastapi_users import exceptions
|
9
|
-
from fastapi_users import schemas
|
10
|
-
from fastapi_users.router.common import ErrorCode
|
11
|
-
from sqlalchemy.ext.asyncio import AsyncSession
|
12
|
-
from sqlmodel import select
|
13
|
-
|
14
|
-
from . import current_active_superuser
|
15
|
-
from ...db import get_async_db
|
16
|
-
from ...schemas.user import UserRead
|
17
|
-
from ...schemas.user import UserUpdate
|
18
|
-
from ._aux_auth import _get_single_user_with_group_ids
|
19
|
-
from fractal_server.app.models import LinkUserGroup
|
20
|
-
from fractal_server.app.models import UserOAuth
|
21
|
-
from fractal_server.app.routes.auth._aux_auth import _user_or_404
|
22
|
-
from fractal_server.app.security import get_user_manager
|
23
|
-
from fractal_server.app.security import UserManager
|
24
|
-
|
25
|
-
router_users = APIRouter()
|
26
|
-
|
27
|
-
|
28
|
-
@router_users.get("/users/{user_id}/", response_model=UserRead)
|
29
|
-
async def get_user(
|
30
|
-
user_id: int,
|
31
|
-
group_ids: bool = True,
|
32
|
-
superuser: UserOAuth = Depends(current_active_superuser),
|
33
|
-
db: AsyncSession = Depends(get_async_db),
|
34
|
-
) -> UserRead:
|
35
|
-
user = await _user_or_404(user_id, db)
|
36
|
-
if group_ids:
|
37
|
-
user_with_group_ids = await _get_single_user_with_group_ids(user, db)
|
38
|
-
return user_with_group_ids
|
39
|
-
else:
|
40
|
-
return user
|
41
|
-
|
42
|
-
|
43
|
-
@router_users.patch("/users/{user_id}/", response_model=UserRead)
|
44
|
-
async def patch_user(
|
45
|
-
user_id: int,
|
46
|
-
user_update: UserUpdate,
|
47
|
-
current_superuser: UserOAuth = Depends(current_active_superuser),
|
48
|
-
user_manager: UserManager = Depends(get_user_manager),
|
49
|
-
db: AsyncSession = Depends(get_async_db),
|
50
|
-
):
|
51
|
-
"""
|
52
|
-
Custom version of the PATCH-user route from `fastapi-users`.
|
53
|
-
"""
|
54
|
-
|
55
|
-
user_to_patch = await _user_or_404(user_id, db)
|
56
|
-
|
57
|
-
try:
|
58
|
-
user = await user_manager.update(
|
59
|
-
user_update, user_to_patch, safe=False, request=None
|
60
|
-
)
|
61
|
-
patched_user = schemas.model_validate(UserOAuth, user)
|
62
|
-
except exceptions.InvalidPasswordException as e:
|
63
|
-
raise HTTPException(
|
64
|
-
status_code=status.HTTP_400_BAD_REQUEST,
|
65
|
-
detail={
|
66
|
-
"code": ErrorCode.UPDATE_USER_INVALID_PASSWORD,
|
67
|
-
"reason": e.reason,
|
68
|
-
},
|
69
|
-
)
|
70
|
-
|
71
|
-
patched_user_with_group_ids = await _get_single_user_with_group_ids(
|
72
|
-
patched_user, db
|
73
|
-
)
|
74
|
-
|
75
|
-
return patched_user_with_group_ids
|
76
|
-
|
77
|
-
|
78
|
-
@router_users.get("/users/", response_model=list[UserRead])
|
79
|
-
async def list_users(
|
80
|
-
user: UserOAuth = Depends(current_active_superuser),
|
81
|
-
db: AsyncSession = Depends(get_async_db),
|
82
|
-
):
|
83
|
-
"""
|
84
|
-
Return list of all users
|
85
|
-
"""
|
86
|
-
stm = select(UserOAuth)
|
87
|
-
res = await db.execute(stm)
|
88
|
-
user_list = res.scalars().unique().all()
|
89
|
-
|
90
|
-
# Get all user/group links
|
91
|
-
stm_all_links = select(LinkUserGroup)
|
92
|
-
res = await db.execute(stm_all_links)
|
93
|
-
links = res.scalars().all()
|
94
|
-
|
95
|
-
# FIXME GROUPS: this must be optimized
|
96
|
-
for ind, user in enumerate(user_list):
|
97
|
-
user_list[ind] = dict(
|
98
|
-
user.model_dump(),
|
99
|
-
group_ids=[
|
100
|
-
link.group_id for link in links if link.user_id == user.id
|
101
|
-
],
|
102
|
-
)
|
103
|
-
return user_list
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/linkusergroup.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/linkuserproject.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v2/collection_state.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/models/v2/workflowtask.py
RENAMED
File without changes
|
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/admin/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/__init__.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/_aux_functions.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/dataset.py
RENAMED
File without changes
|
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/project.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/workflow.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v1/workflowtask.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/__init__.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/_aux_functions.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/dataset.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/images.py
RENAMED
File without changes
|
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/project.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/status.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/submit.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/task_legacy.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/workflow.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/api/v2/workflowtask.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/auth/__init__.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/auth/_aux_auth.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/auth/current_user.py
RENAMED
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/auth/group_names.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/routes/auth/register.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/compress_folder.py
RENAMED
File without changes
|
File without changes
|
{fractal_server-2.4.0a0 → fractal_server-2.4.0a1}/fractal_server/app/runner/executors/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|