mirror of
https://github.com/psforever/PSFPortal.git
synced 2026-07-16 00:44:40 +00:00
Temporarily disable registration/login for non gm
This commit is contained in:
parent
5e54cae329
commit
24e264d229
5 changed files with 7 additions and 5 deletions
|
|
@ -484,7 +484,7 @@ export async function search(term, pagination) {
|
||||||
|
|
||||||
export async function validate_account(username, password) {
|
export async function validate_account(username, password) {
|
||||||
try {
|
try {
|
||||||
const data = await pool.query('SELECT id, passhash FROM accounts WHERE username=$1', [username]);
|
const data = await pool.query('SELECT id, passhash FROM accounts WHERE username=$1 and gm=true', [username]);
|
||||||
|
|
||||||
if (data.rows.length === 0) {
|
if (data.rows.length === 0) {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,9 @@
|
||||||
<li class="nav-item" class:active={route=="/login"}>
|
<li class="nav-item" class:active={route=="/login"}>
|
||||||
<a class="nav-link" href="/login">Login</a>
|
<a class="nav-link" href="/login">Login</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item" class:active={route=="/register"}>
|
<!--<li class="nav-item" class:active={route=="/register"}>
|
||||||
<a class="nav-link" href="/register">Register</a>
|
<a class="nav-link" href="/register">Register</a>
|
||||||
</li>
|
</li>-->
|
||||||
{/if}
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -77,8 +77,8 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
{#if !$loggedIn}
|
{#if !$loggedIn}
|
||||||
<a class="btn btn-primary" href="/login" role="button">Login</a>
|
<!--<a class="btn btn-primary" href="/login" role="button">Login</a>
|
||||||
<a class="btn btn-primary" href="/register" role="button">Create Account</a>
|
<a class="btn btn-primary" href="/register" role="button">Create Account</a>-->
|
||||||
{/if}
|
{/if}
|
||||||
<a class="btn btn-secondary" href="https://docs.google.com/document/d/1ZMx1NUylVZCXJNRyhkuVWT0eUKSVYu0JXsU-y3f93BY/edit" role="button">Setup Instructions</a>
|
<a class="btn btn-secondary" href="https://docs.google.com/document/d/1ZMx1NUylVZCXJNRyhkuVWT0eUKSVYu0JXsU-y3f93BY/edit" role="button">Setup Instructions</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@
|
||||||
|
|
||||||
<Alert bind:this={alert} />
|
<Alert bind:this={alert} />
|
||||||
|
|
||||||
|
<h3 style="color: red;">Login only enabled for GMs at this time</h3>
|
||||||
<form name="login" class="form-group" on:submit|preventDefault={submitLogin}>
|
<form name="login" class="form-group" on:submit|preventDefault={submitLogin}>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="inputUsername">Username</label>
|
<label for="inputUsername">Username</label>
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@
|
||||||
|
|
||||||
<Alert bind:this={alert} />
|
<Alert bind:this={alert} />
|
||||||
|
|
||||||
|
<h2 style="color:red;">Registration is currently disabled. Login via the game client</h2>
|
||||||
<form name="login" class:was-validated={validated} class="form-group needs-validation" novalidate on:submit|preventDefault={submitLogin}>
|
<form name="login" class:was-validated={validated} class="form-group needs-validation" novalidate on:submit|preventDefault={submitLogin}>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="inputUsername">Username</label>
|
<label for="inputUsername">Username</label>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue