User management.

This commit is contained in:
Harshal Dhumal
2016-06-06 13:34:08 +01:00
committed by Dave Page
parent 4398d1d869
commit e3ab4501d5
7 changed files with 1068 additions and 5 deletions

View File

@@ -475,6 +475,7 @@ def index():
return render_template(
MODULE_NAME + "/index.html",
username=current_user.email,
is_admin=current_user.has_role("Administrator"),
_=gettext
)

View File

@@ -68,6 +68,10 @@ try {
<ul class="dropdown-menu navbar-inverse">
<li><a href="{{ url_for('security.change_password') }}">{{ _('Change Password') }}</a></li>
<li class="divider"></li>
{% if is_admin %}
<li><a onclick="pgAdmin.Browser.UserManagement.show_users()">{{ _('Users') }}</a></li>
<li class="divider"></li>
{% endif %}
<li><a href="{{ url_for('security.logout') }}">{{ _('Logout') }}</a></li>
</ul>
</li>