Approved & pending absences can be cancelled. Initial actionability check only accounts for pending absences. Fixes issue where expired absences wouldn't be ended.
Signed-off-by: miguel456 <me@nogueira.codes>
This commit adds several missing "cascade delete" actions to relationships on database tables. This effectively fixes errors while trying to delete user accounts because of pending child records.
Additionally, the observers for applications and vacancies were removed, since they are now obsolete.
The account deletion system was also refactored.
This commit rewrites the previously broken auto ban cleaner. It's now much more efficient and compact, and it removes bans correctly and on the right date.
Fixes#1
This commit moves most controller logic onto Services. Services are part of the Service-Repository pattern. The models act as repositories.
Services are easily testable and are needed for the upcoming API, in order to avoid duplicated code and to maintain a single source of "truth".
The User, Vacancy and Vote controllers still need their logic moved onto services.