From 89a0ffde09055240d5251559240983b74fdd2855 Mon Sep 17 00:00:00 2001 From: Kaitlyn Parkhurst Date: Tue, 22 Nov 2022 23:35:24 -0800 Subject: [PATCH] New registration config. --- ansible/env/example/inventory.yml | 20 +++++++++++++++++++ .../mjb-role-webapp/templates/mjb.yml.j2 | 8 ++++++++ 2 files changed, 28 insertions(+) diff --git a/ansible/env/example/inventory.yml b/ansible/env/example/inventory.yml index 729a602..fda3a33 100644 --- a/ansible/env/example/inventory.yml +++ b/ansible/env/example/inventory.yml @@ -84,6 +84,26 @@ all: # These secrets are used for the session encryption secrets: "{{ vault_panel_config_secrets }}" + + # There are three user registration systems: + # + # 1. open allows anyone to register an account, if they can access the website. + # 2. invite allows anyone to register an account, if they can access the website + # and have an invite code that is provided to them by an admin. + # 3. stripe allows anyone to register an account, if they can make a subscription + # with stripe. + # + # Any registration system that is enabled can be used. + # + # Whichever system is set to the default will be what is used when users click + # 'register' on the website. + # + # Valid values for default are 'stripe', 'invite', 'open'. + register: + default: stripe + enable_stripe: 1 + enable_invite: 1 + enable_open: 0 # Configuration specific to the panel server. panel: diff --git a/ansible/roles/mjb-role-webapp/templates/mjb.yml.j2 b/ansible/roles/mjb-role-webapp/templates/mjb.yml.j2 index 1751566..bd51dd0 100644 --- a/ansible/roles/mjb-role-webapp/templates/mjb.yml.j2 +++ b/ansible/roles/mjb-role-webapp/templates/mjb.yml.j2 @@ -18,3 +18,11 @@ secrets: {% for secret in panel_config.secrets %} - {{ secret }} {% endfor %} + +register: + # If a user clicks 'register' which system should they go to? + default: {{ panel_config.register.default }} + # Valid registration systems: stripe, invite, open + enable_stripe: {{ panel_config.register.enable_stripe }} + enable_invite: {{ panel_config.register.enable_invite }} + enable_open: {{ panel_config.register.enable_open }}