mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 13:25:51 +01:00
LIST USERS should also be available from the /users/ page.
This commit is contained in:
@@ -3,16 +3,16 @@
|
||||
{% block title %}{% trans "User Functions - CyberPanel" %}{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{% load static %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
{% load static %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div id="page-title">
|
||||
<div class="container">
|
||||
<div id="page-title">
|
||||
<h2>{% trans "User Functions" %}</h2>
|
||||
<p>{% trans "Create, edit and delete users on this page." %}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel col-md-11">
|
||||
<div class="panel-body">
|
||||
<h3 class="content-box-header">
|
||||
@@ -21,7 +21,8 @@
|
||||
<div class="example-box-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-3 btn-min-width">
|
||||
<a href="{% url 'viewProfile' %}" title="{% trans 'View Profile' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<a href="{% url 'viewProfile' %}" title="{% trans 'View Profile' %}"
|
||||
class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "View Profile" %}
|
||||
</div>
|
||||
@@ -30,9 +31,23 @@
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% if listUsers %}
|
||||
<div class="col-md-3 btn-min-width">
|
||||
<a href="{% url 'listUsers' %}" title="{% trans 'List Users' %}"
|
||||
class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "List Users" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="fa fa-id-card"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if type != 3 %}
|
||||
<div class="col-md-3 btn-min-width">
|
||||
<a href="{% url 'createUser' %}" title="{% trans 'Create User' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<a href="{% url 'createUser' %}" title="{% trans 'Create User' %}"
|
||||
class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Create User" %}
|
||||
</div>
|
||||
@@ -43,7 +58,8 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 btn-min-width">
|
||||
<a href="{% url 'modifyUsers' %}" title="{% trans 'Modify User' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<a href="{% url 'modifyUsers' %}" title="{% trans 'Modify User' %}"
|
||||
class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Modify User" %}
|
||||
</div>
|
||||
@@ -59,7 +75,8 @@
|
||||
{% if type != 3 %}
|
||||
|
||||
<div class="col-md-3 btn-min-width">
|
||||
<a href="{% url 'deleteUser' %}" title="{% trans 'Delete User' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<a href="{% url 'deleteUser' %}" title="{% trans 'Delete User' %}"
|
||||
class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Delete User" %}
|
||||
</div>
|
||||
@@ -75,7 +92,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -18,7 +18,12 @@ def loadUserHome(request):
|
||||
val = request.session['userID']
|
||||
try:
|
||||
admin = Administrator.objects.get(pk=val)
|
||||
return render(request, 'userManagment/index.html', {"type": admin.type})
|
||||
currentACL = ACLManager.loadedACL(val)
|
||||
if currentACL['admin'] == 1:
|
||||
listUsers = 1
|
||||
else:
|
||||
listUsers = currentACL['listUsers']
|
||||
return render(request, 'userManagment/index.html', {"type": admin.type, 'listUsers': listUsers})
|
||||
except BaseException, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg))
|
||||
return HttpResponse(str(msg))
|
||||
|
||||
Reference in New Issue
Block a user