mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Update auth.ts
This commit is contained in:
@@ -200,20 +200,7 @@ export const auth = betterAuth({
|
|||||||
if (roleMapStr) {
|
if (roleMapStr) {
|
||||||
const mappings = roleMapStr.split(",").map((m) => m.split(":"));
|
const mappings = roleMapStr.split(",").map((m) => m.split(":"));
|
||||||
for (const [group, role] of mappings) {
|
for (const [group, role] of mappings) {
|
||||||
console.log(
|
|
||||||
"Checking role mapping:",
|
|
||||||
group.trim(),
|
|
||||||
"against user groups:",
|
|
||||||
userGroups,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (userGroups.includes(group.trim())) {
|
if (userGroups.includes(group.trim())) {
|
||||||
console.log(
|
|
||||||
"Role mapping matched for group:",
|
|
||||||
group.trim(),
|
|
||||||
"->",
|
|
||||||
role.trim(),
|
|
||||||
);
|
|
||||||
roleToAssign = role.trim();
|
roleToAssign = role.trim();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user