Skip to content

Commit

Permalink
fix: remove admin check for school notes
Browse files Browse the repository at this point in the history
  • Loading branch information
trev-dev committed Oct 26, 2023
1 parent af184e3 commit fcfe830
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions backend/src/components/institute/institute.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,14 +454,8 @@ async function addNewSchoolNote(req, res) {
async function getSchoolNotes(req, res) {
try {
const token = getBackendToken(req);

let school = cacheService.getSchoolBySchoolID(req.params.schoolId);
if(!school || !hasSchoolAdminRole(req, school)){
return res.status(HttpStatus.UNAUTHORIZED).json({
message: 'You do not have the required access for this function'
});
}
const result = await getData(token, `${config.get('server:institute:instituteSchoolURL')}/${req.params.schoolId}/note`);

return res.status(HttpStatus.OK).json(result);
} catch (e) {
logApiError(e, 'getSchoolNotes', 'Error occurred while attempting to get school notes.');
Expand Down

0 comments on commit fcfe830

Please sign in to comment.