Update login pipeline. Limit login to only password

This commit is contained in:
2026-09-12 14:20:07 +01:00
parent 4d75af0418
commit 9cfbde9c9a
30 changed files with 145 additions and 1068 deletions
-11
View File
@@ -40,13 +40,6 @@ export const handler: BunextAPIRouteHandler<APIResponseObject> = async (
}
try {
if (
user_types.find((ty) => ty.user_type == "read_only") &&
!req.method.match(/get/)
) {
throw new Error(`This user can only read records.`);
}
const [table, id] = params.query.paths.split("/") as [
TableType,
string | number,
@@ -63,10 +56,6 @@ export const handler: BunextAPIRouteHandler<APIResponseObject> = async (
};
switch (table) {
case "users":
return await users(crud_params);
case "user_types":
return await userTypes(crud_params);
case "media":
return await media(crud_params);
+1 -1
View File
@@ -34,7 +34,7 @@ export const handler: BunextAPIRouteHandler<APIResponseObject> = async (
const { id, ids, media_paradigm, user_id } = body;
const can_delete_all_media = checkUserAccess({
includes: ["admin", "board_member"],
includes: ["admin"],
user_types,
});