fix(register): changes to not give everyone system admin
This commit is contained in:
@@ -27,7 +27,7 @@ export const userRoles = pgTable(
|
|||||||
{
|
{
|
||||||
user_id: uuid("user_id")
|
user_id: uuid("user_id")
|
||||||
.notNull()
|
.notNull()
|
||||||
.references(() => users.user_id),
|
.references(() => users.user_id, { onDelete: "cascade" }),
|
||||||
role_id: uuid("role_id")
|
role_id: uuid("role_id")
|
||||||
.notNull()
|
.notNull()
|
||||||
.references(() => roles.role_id),
|
.references(() => roles.role_id),
|
||||||
|
|||||||
@@ -33,13 +33,12 @@ function RouteComponent() {
|
|||||||
<span className="font-bold">
|
<span className="font-bold">
|
||||||
Authentication Notice:
|
Authentication Notice:
|
||||||
</span>
|
</span>
|
||||||
To interact with the Alpla prod through this
|
<span>
|
||||||
application, you must use your{" "}
|
The username, email, and password are
|
||||||
<span className="font-semibold">
|
only for LST you <em>DO NOT</em>Need to
|
||||||
Windows login credentials
|
use Windows username if you do not wish
|
||||||
|
to.
|
||||||
</span>
|
</span>
|
||||||
. These credentials are used solely for
|
|
||||||
authentication purposes.
|
|
||||||
</li>
|
</li>
|
||||||
{/* <li>
|
{/* <li>
|
||||||
<span className="font-bold">
|
<span className="font-bold">
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export const registerUser = async (
|
|||||||
.values({ username, email, password })
|
.values({ username, email, password })
|
||||||
.returning({ user: users.username, email: users.email });
|
.returning({ user: users.username, email: users.email });
|
||||||
|
|
||||||
if (usercount.length <= 1) {
|
if (usercount.length === 0) {
|
||||||
createLog(
|
createLog(
|
||||||
"info",
|
"info",
|
||||||
"auth",
|
"auth",
|
||||||
|
|||||||
Reference in New Issue
Block a user