user-groups explained

This commit is contained in:
msramalho
2023-04-26 23:48:28 +01:00
parent 4119387feb
commit 3a040a3fcd
4 changed files with 34 additions and 4 deletions

View File

@@ -4,4 +4,5 @@ ALLOWED_EMAILS=email1,email2
ORCHESTRATION_CONFIG_DEFAULT=secrets/orchestration.yaml
# optional
# ORCHESTRATION_CONFIG_BELLINGCAT=secrets/orchestration-bcat.yaml
DATABASE_PATH="sqlite:///./auto-archiver.db"
DATABASE_PATH="sqlite:///./auto-archiver.db"
USER_GROUPS_FILENAME=user-groups.yaml

View File

@@ -4,4 +4,10 @@ users:
- group2
email2@example.com:
- group2
email3@example-no-group.com:
email3@example-no-group.com:
orchestrators:
group1: secrets/orchestration-group1.yaml
group2: secrets/orchestration-group2.yaml
default: secrets/orchestration-default:.yaml

View File

@@ -21,7 +21,7 @@ load_dotenv()
# Configuration
ALLOWED_ORIGINS = os.environ.get("ALLOWED_ORIGINS", "chrome-extension://ondkcheoicfckabcnkdgbepofpjmjcmb,chrome-extension://ojcimmjndnlmmlgnjaeojoebaceokpdp").split(",")
VERSION = "0.3.1"
VERSION = "0.4.0"
# min-version refers to the version of auto-archiver-extension on the webstore
BREAKING_CHANGES = {"minVersion": "0.3.0", "message": "The latest update has breaking changes, please update the extension to the most recent version."}
@@ -160,4 +160,5 @@ async def on_startup():
@repeat_every(seconds=60 * 60) # 1 hour
async def on_startup():
db: Session = next(get_db())
crud.upsert_user_groups(db, "user-groups.yaml")
USER_GROUPS_FILENAME=os.environ.get("USER_GROUPS_FILENAME", "user-groups.yaml")
crud.upsert_user_groups(db, USER_GROUPS_FILENAME)