SharezoneApp / sharezone-app

Sharezone is a collaborative school organization app for iOS, Android, macOS and web with +500,000 downloads. Built with Flutter & Firebase.
https://sharezone.net
European Union Public License 1.2
273 stars 48 forks source link

Ensure that `.createdOn` can't be set by user code of `GradesService`. #1547

Open Jonas-Sander opened 5 months ago

Jonas-Sander commented 5 months ago

When creating a term,subject,grade type etc the createdOn shouldn't be settable by the user code of the GradesService. We might either decide that the creation functions offer only attributes that the user code is allowed to set (e.g. createdSubject shouldn't have a parameter createdOn, which might mean splitting models - SubjectCreate) or throwing if the createdOn attribut of a model that is passed to the creation functions is set.