mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-24 06:47:17 +00:00
143 lines
7 KiB
HTML
143 lines
7 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<title>User Profile - AIL</title>
|
|
<link rel="icon" href="{{ url_for('static', filename='image/ail-icon.png') }}">
|
|
|
|
<!-- Core CSS -->
|
|
<link href="{{ url_for('static', filename='css/bootstrap4.min.css') }}" rel="stylesheet">
|
|
<link href="{{ url_for('static', filename='css/font-awesome.min.css') }}" rel="stylesheet">
|
|
<link href="{{ url_for('static', filename='css/dataTables.bootstrap.min.css') }}" rel="stylesheet">
|
|
|
|
<!-- JS -->
|
|
<script src="{{ url_for('static', filename='js/jquery.js')}}"></script>
|
|
<script src="{{ url_for('static', filename='js/popper.min.js')}}"></script>
|
|
<script src="{{ url_for('static', filename='js/bootstrap4.min.js')}}"></script>
|
|
<script src="{{ url_for('static', filename='js/jquery.dataTables.min.js')}}"></script>
|
|
<script src="{{ url_for('static', filename='js/dataTables.bootstrap.min.js')}}"></script>
|
|
|
|
</head>
|
|
<body>
|
|
|
|
{% include 'nav_bar.html' %}
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
{% include 'settings/menu_sidebar.html' %}
|
|
|
|
<div class="col-12 col-lg-10" id="core_content">
|
|
|
|
<div class="card mb-3 mt-1">
|
|
<div class="card-header text-white bg-dark pb-1">
|
|
<h5 class="card-title">My Profile :</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
|
|
<div class="row">
|
|
<div class="col-xl-6">
|
|
<div class="card text-center border-secondary">
|
|
<div class="card-body px-1 py-0">
|
|
<table class="table table-sm">
|
|
<tbody>
|
|
<tr>
|
|
<td>Email</td>
|
|
<td>{{meta['id']}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Organisation</td>
|
|
<td>
|
|
{{meta['org_name']}}<br>
|
|
{{meta['org']}}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Role</td>
|
|
<td>{{meta['role']}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>API Key</td>
|
|
<td>
|
|
<span id="censored_key">
|
|
{{meta['api_key'][:4]}}*********************************{{meta['api_key'][-4:]}}
|
|
</span>
|
|
<span id="uncensored_key" style="display: none;">
|
|
{{meta['api_key']}}
|
|
</span>
|
|
<a class="ml-3" href="{{url_for('settings_b.new_token_user_self')}}"><i class="fa fa-random"></i></a>
|
|
<span class="btn btn-outline-secondary ml-1 px-1 py-0" id="btn_key" onclick="show_api_key();">
|
|
<i class="fas fa-eye"></i>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>2FA OTP</td>
|
|
<td>
|
|
{% if meta['2fa'] %}
|
|
<span class="badge badge-success" style="font-size: 1.0rem;"><b>YES</b></span>
|
|
{% if acl_admin %}
|
|
<div>
|
|
<a class="btn btn-sm btn-danger mt-1" href="{{url_for('settings_b.user_otp_reset_self')}}"><i class="fas fa-sync"></i> RESET OTP</a>
|
|
</div>
|
|
{% endif %}
|
|
{% if not global_2fa %}
|
|
<div>
|
|
<a class="btn btn-sm btn-danger mt-1" href="{{url_for('settings_b.user_otp_disable_self')}}"><i class="fas fa-warning"></i> DISABLE 2FA OTP</a>
|
|
</div>
|
|
{% endif %}
|
|
{% else %}
|
|
<span class="badge badge-danger" style="font-size: 1.0rem;"><b>NO</b></span>
|
|
<div>
|
|
<a class="btn btn-success" href="{{url_for('settings_b.user_otp_enable_self')}}"><i class="fas fa-plus"></i> ACTIVATE 2FA OTP</a>
|
|
</div>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% if meta['2fa'] %}
|
|
<tr>
|
|
<td>TOTP</td>
|
|
<td><a class="btn btn-info" href="{{url_for('settings_b.user_hotp')}}"><i class="fas fa-eye"></i> View Paper Tokens</a></td>
|
|
</tr>
|
|
{% endif %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
<script>
|
|
$(document).ready(function(){
|
|
$("#nav_edit_profile").addClass("active");
|
|
$("#nav_my_profile").removeClass("text-muted");
|
|
} );
|
|
|
|
function toggle_sidebar(){
|
|
if($('#nav_menu').is(':visible')){
|
|
$('#nav_menu').hide();
|
|
$('#side_menu').removeClass('border-right')
|
|
$('#side_menu').removeClass('col-lg-2')
|
|
$('#core_content').removeClass('col-lg-10')
|
|
}else{
|
|
$('#nav_menu').show();
|
|
$('#side_menu').addClass('border-right')
|
|
$('#side_menu').addClass('col-lg-2')
|
|
$('#core_content').addClass('col-lg-10')
|
|
}
|
|
}
|
|
|
|
function show_api_key() {
|
|
$('#censored_key').hide();
|
|
$('#btn_key').hide();
|
|
$('#uncensored_key').show();
|
|
}
|
|
|
|
</script>
|
|
|
|
</html>
|