feat: add team_lead role to valid roles in user creation and update handlers

This commit is contained in:
2025-11-14 08:22:11 +01:00
parent 5b1a284fc3
commit 056198ff16
2 changed files with 2 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ async function updateUserHandler(req, { params }) {
// Validate role if provided // Validate role if provided
if (data.role) { if (data.role) {
const validRoles = ["read_only", "user", "project_manager", "admin"]; const validRoles = ["read_only", "user", "project_manager", "team_lead", "admin"];
if (!validRoles.includes(data.role)) { if (!validRoles.includes(data.role)) {
return NextResponse.json( return NextResponse.json(
{ error: "Invalid role specified" }, { error: "Invalid role specified" },

View File

@@ -43,7 +43,7 @@ async function createUserHandler(req) {
} }
// Validate role // Validate role
const validRoles = ["read_only", "user", "project_manager", "admin"]; const validRoles = ["read_only", "user", "project_manager", "team_lead", "admin"];
if (data.role && !validRoles.includes(data.role)) { if (data.role && !validRoles.includes(data.role)) {
return NextResponse.json( return NextResponse.json(
{ error: "Invalid role specified" }, { error: "Invalid role specified" },