feat: add team_lead role to valid roles in user creation and update handlers
This commit is contained in:
@@ -45,7 +45,7 @@ async function updateUserHandler(req, { params }) {
|
||||
|
||||
// Validate role if provided
|
||||
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)) {
|
||||
return NextResponse.json(
|
||||
{ error: "Invalid role specified" },
|
||||
|
||||
@@ -43,7 +43,7 @@ async function createUserHandler(req) {
|
||||
}
|
||||
|
||||
// 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)) {
|
||||
return NextResponse.json(
|
||||
{ error: "Invalid role specified" },
|
||||
|
||||
Reference in New Issue
Block a user