You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
POST request for all entities should verify some things, e.g.:
tl;dr, easier implementation for now: can't POSTActiveSubject without specifying StudyClass & Subject & Teacher. ❌
a Student can't be in a studyClass that has a different educationType or studyYear.
Currently a Teacher can teach any Subject (in table ActiveSubjects) which isn't "real".
Similar to validaitons in Student, adding a Subject to ActiveSubjects should verify that studyClass in the relationship has the correct studyYear & educationType
To-be-edited, lots of stuff left.
PUT request for all entities should have some validations, because they may result in an invalid state
tl;dr easier implementation for now: just remove that particular entitiy from its relations. ❌
Even more simple: Ask Admin to go and delete Student from said StudyClass
Similarly with Subject & ActiveSubject
Teacher isn't affected by this.
To-be-edited, lots of stuff left.
Validate relations in src/models
Students (or any entity generally) shouldn't be able to access other students fees or subjectSchedule or ...
POST
request for all entities should verify some things, e.g.:POST
ActiveSubject
without specifyingStudyClass
&Subject
&Teacher
. ❌Student
can't be in astudyClass
that has a differenteducationType
orstudyYear
.Teacher
can teach anySubject
(in tableActiveSubjects
) which isn't "real".Student
, adding aSubject
toActiveSubjects
should verify thatstudyClass
in the relationship has the correctstudyYear
&educationType
PUT
request for all entities should have some validations, because they may result in an invalid stateAdmin
to go and deleteStudent
from saidStudyClass
Subject
&ActiveSubject
Teacher
isn't affected by this.src/models
fees
orsubjectSchedule
or ...The text was updated successfully, but these errors were encountered: