Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of Validations/Verifications are needed #34

Open
G0maa opened this issue Jan 2, 2023 · 0 comments
Open

Lots of Validations/Verifications are needed #34

G0maa opened this issue Jan 2, 2023 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@G0maa
Copy link
Owner

G0maa commented Jan 2, 2023

  • Taken from Towards v0.1 🎯 #18, as it's an important requirement/issue.
  • Validations (lots of them)
  • POST request for all entities should verify some things, e.g.:
    • tl;dr, easier implementation for now: can't POST ActiveSubject 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 ...
  • https://stackoverflow.com/questions/27900041/rest-put-ids-in-body-or-not
@G0maa G0maa added bug Something isn't working enhancement New feature or request labels Jan 2, 2023
@G0maa G0maa self-assigned this Jan 2, 2023
@G0maa G0maa mentioned this issue Jan 2, 2023
G0maa added a commit that referenced this issue Jan 2, 2023
* Implementing PUT for all entitities
* Not-tested.
* #34 Not solved.
G0maa added a commit that referenced this issue Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant