Skip to content

Commit

Permalink
Merge pull request #58 from arati-tekdi/main
Browse files Browse the repository at this point in the history
Changes in role for read cohort
  • Loading branch information
Shubham4026 authored Nov 21, 2024
2 parents 9627a91 + 11248d5 commit 8dcd41e
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/common/middleware/apiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,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({
Expand All @@ -188,7 +190,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
Expand All @@ -214,9 +218,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: {
Expand Down Expand Up @@ -251,7 +260,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
Expand Down Expand Up @@ -1485,7 +1494,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({
Expand Down

0 comments on commit 8dcd41e

Please sign in to comment.