Update login pipeline. Limit login to only password
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user