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