Add setting to allow MLC registration only (#1259)

* Adds a setting to registration visibility to allow for MLC registration while registration is disabled
This commit is contained in:
Kevin Chung
2020-02-23 23:33:34 -05:00
committed by GitHub
parent 0bae69bee4
commit 7ee47b0abe
4 changed files with 12 additions and 1 deletions

View File

@@ -3,3 +3,8 @@ from CTFd.utils import get_config
def mlc():
return get_config("oauth_client_id") and get_config("oauth_client_secret")
def mlc_registration():
v = get_config("registration_visibility")
return v == "mlc"

View File

@@ -40,3 +40,5 @@ def registration_visible():
return True
elif v == "private":
return False
else:
return False