From 85904b6f535afce68cd856f3613723e70ff06833 Mon Sep 17 00:00:00 2001 From: Arati Tekdi Date: Thu, 21 Nov 2024 12:27:19 +0530 Subject: [PATCH 1/2] Changes in role for read cohort --- src/common/middleware/apiConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/middleware/apiConfig.ts b/src/common/middleware/apiConfig.ts index 4ae9e29..b34625a 100644 --- a/src/common/middleware/apiConfig.ts +++ b/src/common/middleware/apiConfig.ts @@ -249,7 +249,7 @@ export const apiList = { '/user/v1/cohort/mycohorts/:userId': createRouteObject({ get: { PRIVILEGE_CHECK: privilegeGroup.cohort.read, - ROLE_CHECK: rolesGroup.team_leader_teacher, + ROLE_CHECK: rolesGroup.team_leader_teacher.concat(rolesGroup.student), }, }), //cohort member From 11248d5864905343f3aea709c2b848e518c6f152 Mon Sep 17 00:00:00 2001 From: Arati Tekdi Date: Thu, 21 Nov 2024 14:11:35 +0530 Subject: [PATCH 2/2] Added new APIS --- src/common/middleware/apiConfig.ts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/common/middleware/apiConfig.ts b/src/common/middleware/apiConfig.ts index b34625a..ac0fdf5 100644 --- a/src/common/middleware/apiConfig.ts +++ b/src/common/middleware/apiConfig.ts @@ -174,7 +174,9 @@ export const apiList = { '/user/v1/update/:userId': createRouteObject({ patch: { PRIVILEGE_CHECK: privilegeGroup.users.update, - ROLE_CHECK: rolesGroup.admin_team_leader_teacher, + ROLE_CHECK: rolesGroup.admin_team_leader_teacher.concat( + rolesGroup.student, + ), }, }), '/user/v1/delete/:userId': createRouteObject({ @@ -186,7 +188,9 @@ export const apiList = { '/user/v1/list': createRouteObject({ post: { PRIVILEGE_CHECK: privilegeGroup.users.read, - ROLE_CHECK: rolesGroup.admin_team_leader_teacher, + ROLE_CHECK: rolesGroup.admin_team_leader_teacher.concat( + rolesGroup.student, + ), }, }), //need confirmation @@ -212,9 +216,14 @@ export const apiList = { '/user/v1/check': createRouteObject({ post: { PRIVILEGE_CHECK: privilegeGroup.users.read, - ROLE_CHECK: rolesGroup.admin_team_leader_teacher, + ROLE_CHECK: rolesGroup.admin_team_leader_teacher.concat( + rolesGroup.student, + ), }, }), + '/user/v1/auth/refresh': createRouteObject({ + post: {}, + }), //cohort '/user/v1/cohort/cohortHierarchy/:cohortId': createRouteObject({ get: { @@ -1483,7 +1492,9 @@ export const apiList = { '/api/v1/attendance/list': createRouteObject({ post: { PRIVILEGE_CHECK: privilegeGroup.attendance.read, - ROLE_CHECK: rolesGroup.admin_team_leader_teacher, + ROLE_CHECK: rolesGroup.admin_team_leader_teacher.concat( + rolesGroup.student, + ), }, }), '/api/v1/attendance/bulkAttendance': createRouteObject({