mirror of
https://github.com/aljazceru/CTFd.git
synced 2026-02-10 00:34:21 +01:00
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:
@@ -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"
|
||||
|
||||
@@ -40,3 +40,5 @@ def registration_visible():
|
||||
return True
|
||||
elif v == "private":
|
||||
return False
|
||||
else:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user