Skip to content

Commit

Permalink
fix: update page access (#2432)
Browse files Browse the repository at this point in the history
  • Loading branch information
valerydluski authored Feb 13, 2024
1 parent c504e26 commit 1e380e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions client/src/pages/course/interview/[type]/feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ export { getServerSideProps };

export default function (props: PageProps) {
return (
<SessionProvider allowedRoles={[CourseRole.Mentor]} course={props.course}>
<ActiveCourseProvider>
<ActiveCourseProvider>
<SessionProvider allowedRoles={[CourseRole.Mentor]} course={props.course}>
{props.type === stageInterviewType ? <Feedback {...props} /> : <InterviewFeedback {...props} />}
</ActiveCourseProvider>
</SessionProvider>
</SessionProvider>
</ActiveCourseProvider>
);
}
6 changes: 3 additions & 3 deletions nestjs/src/courses/interviews/interviews.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
ApiQuery,
ApiTags,
} from '@nestjs/swagger';
import { CourseGuard, CourseRole, CurrentRequest, DefaultGuard, RequiredRoles, RoleGuard } from '../../auth';
import { CourseGuard, CourseRole, CurrentRequest, DefaultGuard, RequiredRoles, Role, RoleGuard } from '../../auth';
import { DEFAULT_CACHE_TTL } from '../../constants';
import { InterviewDto } from './dto';
import { AvailableStudentDto } from './dto/available-student.dto';
Expand Down Expand Up @@ -85,7 +85,7 @@ export class InterviewsController {
@ApiForbiddenResponse()
@ApiBadRequestResponse()
@ApiOperation({ operationId: 'getAvailableStudents' })
@RequiredRoles([CourseRole.Mentor, CourseRole.Supervisor, CourseRole.Manager], true)
@RequiredRoles([CourseRole.Mentor, CourseRole.Supervisor, CourseRole.Manager, Role.Admin], true)
public async getAvailableStudents(
@Param('courseId', ParseIntPipe) courseId: number,
@Param('interviewId', ParseIntPipe) interviewId: number,
Expand All @@ -112,7 +112,7 @@ export class InterviewsController {
@ApiForbiddenResponse()
@ApiBadRequestResponse()
@ApiOperation({ operationId: 'getInterviewFeedback' })
@RequiredRoles([CourseRole.Mentor, CourseRole.Supervisor, CourseRole.Manager], true)
@RequiredRoles([CourseRole.Mentor, CourseRole.Supervisor, CourseRole.Manager, Role.Admin], true)
public async getInterviewFeedback(
@Param('courseId', ParseIntPipe) _: number,
@Param('interviewId', ParseIntPipe) interviewId: number,
Expand Down

0 comments on commit 1e380e9

Please sign in to comment.