Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
2f8866ef
Commit
2f8866ef
authored
Apr 28, 2015
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
if there are no users at all the warning on the control panel login screen was incorrect
parent
f98afac6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
daemon.py
management/daemon.py
+2
-0
login.html
management/templates/login.html
+10
-2
No files found.
management/daemon.py
View file @
2f8866ef
...
...
@@ -90,10 +90,12 @@ def json_response(data):
def
index
():
# Render the control panel. This route does not require user authentication
# so it must be safe!
no_users_exist
=
(
len
(
get_mail_users
(
env
))
==
0
)
no_admins_exist
=
(
len
(
get_admins
(
env
))
==
0
)
return
render_template
(
'index.html'
,
hostname
=
env
[
'PRIMARY_HOSTNAME'
],
storage_root
=
env
[
'STORAGE_ROOT'
],
no_users_exist
=
no_users_exist
,
no_admins_exist
=
no_admins_exist
,
)
...
...
management/templates/login.html
View file @
2f8866ef
<h1
style=
"margin: 1em; text-align: center"
>
{{hostname}}
</h1>
{% if no_admins_exist %}
{% if no_
users_exist or no_
admins_exist %}
<div
class=
"row"
>
<div
class=
"col-md-offset-2 col-md-8"
>
{% if no_users_exist %}
<p
class=
"text-danger"
>
There are no users on this system! To make an administrative user,
log into this machine using SSH (like when you first set it up) and run:
</p>
<pre>
cd mailinabox
sudo tools/mail.py user add me@{{hostname}}
sudo tools/mail.py user make-admin me@{{hostname}}
</pre>
{% else %}
<p
class=
"text-danger"
>
There are no administrative users on this system! To make an administrative user,
log into this machine using SSH (like when you first set it up) and run:
</p>
<pre>
cd mailinabox
sudo tools/mail.py user make-admin your@emailaddress.com
</pre>
sudo tools/mail.py user make-admin me@{{hostname}}
</pre>
{% endif %}
<hr>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment