feat: add team_lead role to user management and update related functionalities
This commit is contained in:
@@ -53,7 +53,7 @@ export function getAllUsers() {
|
||||
|
||||
// Update user role
|
||||
export function updateUserRole(userId, role) {
|
||||
const validRoles = ['admin', 'project_manager', 'user', 'read_only']
|
||||
const validRoles = ['admin', 'team_lead', 'project_manager', 'user', 'read_only']
|
||||
if (!validRoles.includes(role)) {
|
||||
throw new Error("Invalid role")
|
||||
}
|
||||
@@ -159,7 +159,7 @@ export async function updateUser(userId, updates) {
|
||||
}
|
||||
|
||||
if (updates.role !== undefined) {
|
||||
const validRoles = ['admin', 'project_manager', 'user', 'read_only'];
|
||||
const validRoles = ['admin', 'team_lead', 'project_manager', 'user', 'read_only'];
|
||||
if (!validRoles.includes(updates.role)) {
|
||||
throw new Error("Invalid role");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user