get rid of a lot of cruft in config files, w/ jason
This commit is contained in:
parent
07337cd7b8
commit
11026b02fa
|
@ -1,14 +0,0 @@
|
||||||
"""Demo environment."""
|
|
||||||
from os import environ
|
|
||||||
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_COMMIT_ON_SAVE = True
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_USERNAME = "demo"
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_USER_EMAIL = "demo@example.com"
|
|
||||||
SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME = environ.get(
|
|
||||||
"SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME",
|
|
||||||
default="terraform_deployed_environment.yml",
|
|
||||||
)
|
|
||||||
|
|
||||||
SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER = (
|
|
||||||
environ.get("SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER", default="false") == "true"
|
|
||||||
)
|
|
|
@ -1,14 +0,0 @@
|
||||||
"""Dev."""
|
|
||||||
from os import environ
|
|
||||||
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_PUBLISH_TARGET_BRANCH = environ.get(
|
|
||||||
"SPIFFWORKFLOW_BACKEND_GIT_PUBLISH_TARGET_BRANCH", default="staging"
|
|
||||||
)
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_USERNAME = environ.get(
|
|
||||||
"SPIFFWORKFLOW_BACKEND_GIT_USERNAME", default="sartography-automated-committer"
|
|
||||||
)
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_USER_EMAIL = environ.get(
|
|
||||||
"SPIFFWORKFLOW_BACKEND_GIT_USER_EMAIL",
|
|
||||||
default="sartography-automated-committer@users.noreply.github.com",
|
|
||||||
)
|
|
||||||
SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME = "dev.yml"
|
|
|
@ -1,70 +1,8 @@
|
||||||
default_group: everybody
|
default_group: everybody
|
||||||
|
|
||||||
users:
|
|
||||||
admin:
|
|
||||||
email: admin@spiffworkflow.org
|
|
||||||
password: admin
|
|
||||||
preferred_username: Admin
|
|
||||||
|
|
||||||
groups:
|
groups:
|
||||||
admin:
|
admin:
|
||||||
users:
|
users: [admin@spiffworkflow.org]
|
||||||
[
|
|
||||||
admin@spiffworkflow.org,
|
|
||||||
jakub@status.im,
|
|
||||||
jarrad@status.im,
|
|
||||||
kb@sartography.com,
|
|
||||||
alex@sartography.com,
|
|
||||||
dan@sartography.com,
|
|
||||||
mike@sartography.com,
|
|
||||||
jason@sartography.com,
|
|
||||||
j@sartography.com,
|
|
||||||
elizabeth@sartography.com,
|
|
||||||
jon@sartography.com,
|
|
||||||
]
|
|
||||||
|
|
||||||
Finance Team:
|
|
||||||
users:
|
|
||||||
[
|
|
||||||
jakub@status.im,
|
|
||||||
amir@status.im,
|
|
||||||
jarrad@status.im,
|
|
||||||
sasha@status.im,
|
|
||||||
fin@status.im,
|
|
||||||
fin1@status.im,
|
|
||||||
alex@sartography.com,
|
|
||||||
dan@sartography.com,
|
|
||||||
mike@sartography.com,
|
|
||||||
jason@sartography.com,
|
|
||||||
j@sartography.com,
|
|
||||||
elizabeth@sartography.com,
|
|
||||||
jon@sartography.com,
|
|
||||||
]
|
|
||||||
|
|
||||||
demo:
|
|
||||||
users:
|
|
||||||
[
|
|
||||||
harmeet@status.im,
|
|
||||||
sasha@status.im,
|
|
||||||
manuchehr@status.im,
|
|
||||||
core@status.im,
|
|
||||||
fin@status.im,
|
|
||||||
fin1@status.im,
|
|
||||||
lead@status.im,
|
|
||||||
lead1@status.im,
|
|
||||||
]
|
|
||||||
|
|
||||||
test:
|
|
||||||
users:
|
|
||||||
[
|
|
||||||
natalia@sartography.com,
|
|
||||||
]
|
|
||||||
|
|
||||||
admin-ro:
|
|
||||||
users:
|
|
||||||
[
|
|
||||||
j@sartography.com,
|
|
||||||
]
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
admin:
|
admin:
|
||||||
|
@ -72,107 +10,3 @@ permissions:
|
||||||
users: []
|
users: []
|
||||||
allowed_permissions: [create, read, update, delete]
|
allowed_permissions: [create, read, update, delete]
|
||||||
uri: /*
|
uri: /*
|
||||||
admin-readonly:
|
|
||||||
groups: [admin-ro]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /*
|
|
||||||
admin-process-instances-for-readonly:
|
|
||||||
groups: [admin-ro]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create, read, update, delete]
|
|
||||||
uri: /process-instances/*
|
|
||||||
|
|
||||||
# open system defaults for everybody
|
|
||||||
read-all-process-groups:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /process-groups/*
|
|
||||||
read-all-process-models:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /process-models/*
|
|
||||||
|
|
||||||
# basic perms for everybody
|
|
||||||
read-all-process-instances-for-me:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /process-instances/for-me/*
|
|
||||||
read-process-instance-reports:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create, read, update, delete]
|
|
||||||
uri: /process-instances/reports/*
|
|
||||||
read-process-instances-find-by-id:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /process-instances/find-by-id/*
|
|
||||||
processes-read:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /processes
|
|
||||||
service-tasks:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /service-tasks
|
|
||||||
tasks-crud:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create, read, update, delete]
|
|
||||||
uri: /tasks/*
|
|
||||||
user-groups-for-current-user:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /user-groups/for-current-user
|
|
||||||
|
|
||||||
|
|
||||||
finance-admin:
|
|
||||||
groups: ["Finance Team"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create, read, update, delete]
|
|
||||||
uri: /process-groups/manage-procurement:procurement:*
|
|
||||||
|
|
||||||
manage-revenue-streams-instances:
|
|
||||||
groups: ["demo"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create]
|
|
||||||
uri: /process-instances/manage-revenue-streams:product-revenue-streams:customer-contracts-trade-terms/*
|
|
||||||
manage-procurement-invoice-instances:
|
|
||||||
groups: ["demo"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create]
|
|
||||||
uri: /process-instances/manage-procurement:procurement:core-contributor-invoice-management:*
|
|
||||||
manage-procurement-instances:
|
|
||||||
groups: ["demo"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create]
|
|
||||||
uri: /process-instances/manage-procurement:vendor-lifecycle-management:*
|
|
||||||
|
|
||||||
manage-revenue-streams-instances-for-me:
|
|
||||||
groups: ["demo"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /process-instances/for-me/manage-revenue-streams:product-revenue-streams:customer-contracts-trade-terms/*
|
|
||||||
manage-procurement-invoice-instances-for-me:
|
|
||||||
groups: ["demo"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /process-instances/for-me/manage-procurement:procurement:core-contributor-invoice-management:*
|
|
||||||
manage-procurement-instances-for-me:
|
|
||||||
groups: ["demo"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /process-instances/for-me/manage-procurement:vendor-lifecycle-management:*
|
|
||||||
|
|
||||||
create-test-instances:
|
|
||||||
groups: ["test"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create, read]
|
|
||||||
uri: /process-instances/misc:test:*
|
|
||||||
|
|
|
@ -1,148 +0,0 @@
|
||||||
default_group: everybody
|
|
||||||
|
|
||||||
groups:
|
|
||||||
admin:
|
|
||||||
users:
|
|
||||||
[
|
|
||||||
admin@spiffworkflow.org,
|
|
||||||
jakub@status.im,
|
|
||||||
jarrad@status.im,
|
|
||||||
kb@sartography.com,
|
|
||||||
alex@sartography.com,
|
|
||||||
dan@sartography.com,
|
|
||||||
mike@sartography.com,
|
|
||||||
jason@sartography.com,
|
|
||||||
j@sartography.com,
|
|
||||||
elizabeth@sartography.com,
|
|
||||||
jon@sartography.com,
|
|
||||||
]
|
|
||||||
|
|
||||||
Finance Team:
|
|
||||||
users:
|
|
||||||
[
|
|
||||||
jakub@status.im,
|
|
||||||
amir@status.im,
|
|
||||||
jarrad@status.im,
|
|
||||||
sasha@status.im,
|
|
||||||
fin@status.im,
|
|
||||||
fin1@status.im,
|
|
||||||
alex@sartography.com,
|
|
||||||
dan@sartography.com,
|
|
||||||
mike@sartography.com,
|
|
||||||
jason@sartography.com,
|
|
||||||
j@sartography.com,
|
|
||||||
elizabeth@sartography.com,
|
|
||||||
jon@sartography.com,
|
|
||||||
]
|
|
||||||
|
|
||||||
demo:
|
|
||||||
users:
|
|
||||||
[
|
|
||||||
harmeet@status.im,
|
|
||||||
sasha@status.im,
|
|
||||||
manuchehr@status.im,
|
|
||||||
core@status.im,
|
|
||||||
fin@status.im,
|
|
||||||
fin1@status.im,
|
|
||||||
lead@status.im,
|
|
||||||
lead1@status.im,
|
|
||||||
]
|
|
||||||
test:
|
|
||||||
users:
|
|
||||||
[
|
|
||||||
natalia@sartography.com,
|
|
||||||
]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
admin:
|
|
||||||
groups: [admin]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /*
|
|
||||||
admin-process-instances:
|
|
||||||
groups: [admin]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create, read, update, delete]
|
|
||||||
uri: /process-instances/*
|
|
||||||
|
|
||||||
# open system defaults for everybody
|
|
||||||
read-all-process-groups:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /process-groups/*
|
|
||||||
read-all-process-models:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /process-models/*
|
|
||||||
|
|
||||||
# basic perms for everybody
|
|
||||||
read-all-process-instances-for-me:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /process-instances/for-me/*
|
|
||||||
read-process-instance-reports:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create, read, update, delete]
|
|
||||||
uri: /process-instances/reports/*
|
|
||||||
processes-read:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /processes
|
|
||||||
service-tasks:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /service-tasks
|
|
||||||
tasks-crud:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create, read, update, delete]
|
|
||||||
uri: /tasks/*
|
|
||||||
user-groups-for-current-user:
|
|
||||||
groups: [everybody]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /user-groups/for-current-user
|
|
||||||
|
|
||||||
manage-revenue-streams-instances:
|
|
||||||
groups: ["demo"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create]
|
|
||||||
uri: /process-instances/manage-revenue-streams:product-revenue-streams:customer-contracts-trade-terms/*
|
|
||||||
manage-procurement-invoice-instances:
|
|
||||||
groups: ["demo"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create]
|
|
||||||
uri: /process-instances/manage-procurement:procurement:core-contributor-invoice-management:*
|
|
||||||
manage-procurement-instances:
|
|
||||||
groups: ["demo"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create]
|
|
||||||
uri: /process-instances/manage-procurement:vendor-lifecycle-management:*
|
|
||||||
|
|
||||||
manage-revenue-streams-instances-for-me:
|
|
||||||
groups: ["demo"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /process-instances/for-me/manage-revenue-streams:product-revenue-streams:customer-contracts-trade-terms/*
|
|
||||||
manage-procurement-invoice-instances-for-me:
|
|
||||||
groups: ["demo"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /process-instances/for-me/manage-procurement:procurement:core-contributor-invoice-management:*
|
|
||||||
manage-procurement-instances-for-me:
|
|
||||||
groups: ["demo"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [read]
|
|
||||||
uri: /process-instances/for-me/manage-procurement:vendor-lifecycle-management:*
|
|
||||||
|
|
||||||
create-test-instances:
|
|
||||||
groups: ["test"]
|
|
||||||
users: []
|
|
||||||
allowed_permissions: [create, read]
|
|
||||||
uri: /process-instances/misc:test:*
|
|
|
@ -1,16 +0,0 @@
|
||||||
"""Qa1."""
|
|
||||||
from os import environ
|
|
||||||
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_PUBLISH_TARGET_BRANCH = environ.get(
|
|
||||||
"SPIFFWORKFLOW_BACKEND_GIT_PUBLISH_TARGET_BRANCH", default="qa2"
|
|
||||||
)
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_USERNAME = environ.get(
|
|
||||||
"SPIFFWORKFLOW_BACKEND_GIT_USERNAME", default="sartography-automated-committer"
|
|
||||||
)
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_USER_EMAIL = environ.get(
|
|
||||||
"SPIFFWORKFLOW_BACKEND_GIT_USER_EMAIL",
|
|
||||||
default=f"{SPIFFWORKFLOW_BACKEND_GIT_USERNAME}@users.noreply.github.com",
|
|
||||||
)
|
|
||||||
SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME = environ.get(
|
|
||||||
"SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME", default="qa1.yml"
|
|
||||||
)
|
|
|
@ -1,4 +1,4 @@
|
||||||
"""Qa2."""
|
"""qa2 just here as an example of path based routing for apps."""
|
||||||
from os import environ
|
from os import environ
|
||||||
|
|
||||||
SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME = environ.get(
|
SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME = environ.get(
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
"""Default."""
|
|
||||||
from os import environ
|
|
||||||
|
|
||||||
environment_identifier_for_this_config_file_only = environ["SPIFFWORKFLOW_BACKEND_ENV"]
|
|
||||||
SPIFFWORKFLOW_BACKEND_OPEN_ID_SERVER_URL = (
|
|
||||||
f"https://keycloak.{environment_identifier_for_this_config_file_only}.spiffworkflow.org/realms/sartography"
|
|
||||||
)
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_SOURCE_BRANCH = environ.get("SPIFFWORKFLOW_BACKEND_GIT_SOURCE_BRANCH", default="main")
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_PUBLISH_CLONE_URL = environ.get(
|
|
||||||
"SPIFFWORKFLOW_BACKEND_GIT_PUBLISH_CLONE_URL",
|
|
||||||
default="https://github.com/sartography/sartography-process-models.git",
|
|
||||||
)
|
|
|
@ -1,9 +0,0 @@
|
||||||
"""Staging."""
|
|
||||||
from os import environ
|
|
||||||
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_SOURCE_BRANCH = environ.get("SPIFFWORKFLOW_BACKEND_GIT_SOURCE_BRANCH", default="staging")
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_PUBLISH_TARGET_BRANCH = environ.get(
|
|
||||||
"SPIFFWORKFLOW_BACKEND_GIT_PUBLISH_TARGET_BRANCH", default="main"
|
|
||||||
)
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_COMMIT_ON_SAVE = False
|
|
||||||
SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME = "staging.yml"
|
|
|
@ -5,8 +5,13 @@ from os import environ
|
||||||
environment_identifier_for_this_config_file_only = environ["SPIFFWORKFLOW_BACKEND_ENV"]
|
environment_identifier_for_this_config_file_only = environ["SPIFFWORKFLOW_BACKEND_ENV"]
|
||||||
|
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_COMMIT_ON_SAVE = True
|
SPIFFWORKFLOW_BACKEND_GIT_COMMIT_ON_SAVE = True
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_USERNAME = "sartography-automated-committer"
|
SPIFFWORKFLOW_BACKEND_GIT_USERNAME = environ.get(
|
||||||
SPIFFWORKFLOW_BACKEND_GIT_USER_EMAIL = f"{SPIFFWORKFLOW_BACKEND_GIT_USERNAME}@users.noreply.github.com"
|
"SPIFFWORKFLOW_BACKEND_GIT_USERNAME", default="sartography-automated-committer"
|
||||||
|
)
|
||||||
|
SPIFFWORKFLOW_BACKEND_GIT_USER_EMAIL = environ.get(
|
||||||
|
"SPIFFWORKFLOW_BACKEND_GIT_USER_EMAIL",
|
||||||
|
default=f"{SPIFFWORKFLOW_BACKEND_GIT_USERNAME}@users.noreply.github.com",
|
||||||
|
)
|
||||||
SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME = environ.get(
|
SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME = environ.get(
|
||||||
"SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME",
|
"SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME",
|
||||||
default="terraform_deployed_environment.yml",
|
default="terraform_deployed_environment.yml",
|
||||||
|
|
|
@ -128,7 +128,7 @@ class ApiError(Exception):
|
||||||
instance = cls(code, message, status_code=status_code)
|
instance = cls(code, message, status_code=status_code)
|
||||||
instance.task_id = task_spec.name or ""
|
instance.task_id = task_spec.name or ""
|
||||||
instance.task_name = task_spec.description or ""
|
instance.task_name = task_spec.description or ""
|
||||||
if hasattr(task_spec, '_wf_spec') and task_spec._wf_spec:
|
if hasattr(task_spec, "_wf_spec") and task_spec._wf_spec:
|
||||||
instance.file_name = task_spec._wf_spec.file
|
instance.file_name = task_spec._wf_spec.file
|
||||||
return instance
|
return instance
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue