3ceeeeeca1
- Copyright was "© <year> <name>" where <name> is conf.name — an operator-configurable display name (e.g. whatever CFG_ORG is set to), not a real copyright holder. Changed to "© <year> theta42", matching the LICENSE file. Also dropped "All rights reserved", which contradicts the MIT license this project ships under; added an explicit MIT License link instead. - Moved the GitHub icon link out of the top nav (where it competed with actual navigation items) and into the footer, alongside the license link and version/build info. - Deduplicated the identical buildVersion/buildHash/buildYear computation that was copy-pasted in both routes/index.js and routes/oauth.js into a shared nodejs/utils/build_info.js. Verified by rendering top+bottom with the real ejs package: no template errors, GitHub link present exactly once (in the footer, not the nav), "All rights reserved" gone, MIT License link present. npm test failures (155) are pre-existing/environmental (no LDAP server here) — identical failure count with these changes stashed out.
127 lines
5.3 KiB
Plaintext
Executable File
127 lines
5.3 KiB
Plaintext
Executable File
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<title>SSO - Theta 42 <%- title %></title>
|
|
<!-- Favicon -->
|
|
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
|
<!-- CSS are placed here -->
|
|
<link rel="stylesheet" href="/static-modules/bootstrap/dist/css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="/static-modules/@fortawesome/fontawesome-free/css/all.min.css">
|
|
|
|
<link rel='stylesheet' href='/static/css/styles.css' />
|
|
<!-- Scripts are placed here -->
|
|
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
|
|
<script type="text/javascript" src='/static-modules/jquery/dist/jquery.js'></script>
|
|
<!-- <script type="text/javascript" src="/static/lib/js/popper-1.16.0.min.js"></script> -->
|
|
<!-- <script type="text/javascript" src="/static-modules/bootstrap/dist/js/bootstrap.min.js"></script> -->
|
|
<script type="text/javascript" src="/static-modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script type="text/javascript" src="/static-modules/@fortawesome/fontawesome-free/js/all.min.js"></script>
|
|
<script type="text/javascript" src='/static-modules/mustache/mustache.min.js'></script>
|
|
<script type="text/javascript" src='/static-modules/jq-repeat/dist/js/jq-repeat.js'></script>
|
|
<script type="text/javascript" src='/static/lib/js/val.js'></script>
|
|
<script type="text/javascript" src="/static-modules/moment/moment.js"></script>
|
|
<script type="text/javascript" src="/static/lib/js/app-base.js"></script>
|
|
<script type="text/javascript" src="/static/js/app.js"></script>
|
|
|
|
|
|
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
|
<!--[if lt IE 9]>
|
|
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
|
<![endif]-->
|
|
</head>
|
|
<body>
|
|
|
|
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
|
<a class="navbar-brand" href="#">SSO Manager <%- titleIcon %></a>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse justify-content-end" id="navbarSupportedContent">
|
|
<ul class="navbar-nav top-nav">
|
|
<li class="nav-item">
|
|
<a class="nav-link active" href="/">
|
|
<i class="fa-regular fa-id-card"></i>
|
|
Profile
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/api-tokens">
|
|
<i class="fa-solid fa-code"></i>
|
|
API Tokens
|
|
</a>
|
|
</li>
|
|
<li class="nav-item group-required group-required-app_sso_admin">
|
|
<a class="nav-link" href="/users"><i class="fa-solid fa-users"></i>
|
|
Users
|
|
</a>
|
|
</li>
|
|
<li class="nav-item group-required group-required-app_sso_admin">
|
|
<a class="nav-link" href="/groups"><i class="fa-solid fa-users-viewfinder"></i>
|
|
Groups
|
|
</a>
|
|
</li>
|
|
<li class="nav-item group-required group-required-app_sso_admin">
|
|
<a class="nav-link" href="/oauth-clients">
|
|
<i class="fa-solid fa-key"></i>
|
|
OAuth Apps
|
|
</a>
|
|
</li>
|
|
<li class="nav-item group-required group-required-app_sso_admin group-required-app_sso_invite">
|
|
<a class="nav-link" href="/invites">
|
|
<i class="fa-solid fa-envelope-open-text"></i>
|
|
Invites
|
|
</a>
|
|
</li>
|
|
<li class="nav-item group-required group-required-app_sso_admin">
|
|
<a class="nav-link" href="/notifications">
|
|
<i class="fa-solid fa-paper-plane"></i>
|
|
Notifications
|
|
</a>
|
|
</li>
|
|
<li class="nav-item group-required group-required-app_sso_admin">
|
|
<a class="nav-link" href="/admin">
|
|
<i class="fa-solid fa-screwdriver-wrench"></i>
|
|
Admin
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<div class="form-inline mt-2 mt-md-0">
|
|
<a id="cl-login-button" class="btn btn-outline-danger my-2 my-sm-0" onclick="app.auth.forceLogin()" style="display: none;">
|
|
<i class="fas fa-sign-out"></i>
|
|
Login
|
|
</a>
|
|
|
|
<button id="cl-logout-button" class="btn btn-outline-danger my-2 my-sm-0" onclick="app.auth.logOut(e => window.location.href='/')" style="display: none;">
|
|
<i class="fas fa-sign-out"></i>
|
|
Log Out
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<script type="text/javascript">
|
|
$(document).ready(async function(){
|
|
|
|
// Set the correct link to active in the top nav bar
|
|
$('.top-nav a').each(function(index){
|
|
let $this = $(this);
|
|
$this.removeClass('active');
|
|
if($this.attr('href').toLocaleLowerCase() === window.location.pathname.toLocaleLowerCase()){
|
|
$this.addClass('active')
|
|
}
|
|
})
|
|
|
|
// Set the correct login/logout button
|
|
|
|
if(await app.auth.isLoggedIn()) $('#cl-logout-button').show();
|
|
else $('#cl-login-button').show();
|
|
|
|
});
|
|
</script>
|
|
|
|
|
|
<!-- Container -->
|
|
<div id="spa-shell" class="container-fluid">
|
|
<div class="actionMessage" style="display:none;"></div>
|