Tell users to contact server admin to get enabled
This commit is contained in:
1 parent
41422d0b32
commit
42821ceb10
3 files changed
+18
No files matched your search
@@ -12,6 +12,9 @@ FRAMEWORK_DEFAULTS = {
|
|||||||
# Controls the Link on the sidebar
|
# Controls the Link on the sidebar
|
||||||
'framework' : FRAMEWORK_REPO_URL,
|
'framework' : FRAMEWORK_REPO_URL,
|
||||||
|
|
||||||
|
# Email of OpenBench instance owner
|
||||||
|
'serveradmin' : 'andrew@grantnet.us',
|
||||||
|
|
||||||
# SPRT Elo bounds and type I/II errors
|
# SPRT Elo bounds and type I/II errors
|
||||||
'sprt' : {
|
'sprt' : {
|
||||||
'elolower' : 0.00, 'eloupper' : 5.00,
|
'elolower' : 0.00, 'eloupper' : 5.00,
|
||||||
|
|||||||
@@ -111,6 +111,10 @@ def editProfile(request):
|
|||||||
|
|
||||||
def index(request, page=0, pageLength=25, greens=False, username=None, error=''):
|
def index(request, page=0, pageLength=25, greens=False, username=None, error=''):
|
||||||
|
|
||||||
|
# Get information about the logged in user
|
||||||
|
if not request.user.is_authenticated: profile = None
|
||||||
|
else: profile = Profile.objects.get(user=request.user)
|
||||||
|
|
||||||
# Get tests pending approval
|
# Get tests pending approval
|
||||||
pending = Test.objects.filter(approved=False)
|
pending = Test.objects.filter(approved=False)
|
||||||
pending = pending.exclude(finished=True)
|
pending = pending.exclude(finished=True)
|
||||||
@@ -169,6 +173,7 @@ def index(request, page=0, pageLength=25, greens=False, username=None, error='')
|
|||||||
# Build context dictionary for index template
|
# Build context dictionary for index template
|
||||||
data = {
|
data = {
|
||||||
'error' : error,
|
'error' : error,
|
||||||
|
'profile' : profile,
|
||||||
'pending' : pending,
|
'pending' : pending,
|
||||||
'active' : active,
|
'active' : active,
|
||||||
'completed' : completed[start:end],
|
'completed' : completed[start:end],
|
||||||
|
|||||||
@@ -12,11 +12,21 @@
|
|||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
||||||
{% if error %}
|
{% if error %}
|
||||||
<div id="error">
|
<div id="error">
|
||||||
<strong>{{error}}</strong>
|
<strong>{{error}}</strong>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if request.user.is_authenticated and not profile.enabled %}
|
||||||
|
<div id="error">
|
||||||
|
<strong>{{profile.user.username}}! Your account is not enabled.</strong>
|
||||||
|
<strong>Contact the Admin ( {{config.serveradmin}} )</strong>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div id="sidebar">
|
<div id="sidebar">
|
||||||
{% block sidebar %}
|
{% block sidebar %}
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
Reference in new issue
Block a user