Update auth.ts

This commit is contained in:
Théo LAGACHE
2026-02-27 09:53:24 +01:00
parent dbf5addf12
commit 41c632ccfa
-13
View File
@@ -200,20 +200,7 @@ export const auth = betterAuth({
if (roleMapStr) {
const mappings = roleMapStr.split(",").map((m) => m.split(":"));
for (const [group, role] of mappings) {
console.log(
"Checking role mapping:",
group.trim(),
"against user groups:",
userGroups,
);
if (userGroups.includes(group.trim())) {
console.log(
"Role mapping matched for group:",
group.trim(),
"->",
role.trim(),
);
roleToAssign = role.trim();
break;
}