Commit Graph

18 Commits

Author SHA1 Message Date
8942623bde
Added services
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.
2021-07-25 22:54:15 +01:00
f62ea9669b
Finished applications API endpoint group 2021-03-31 19:39:42 +01:00
6940b1816e
Merge remote-tracking branch 'origin/develop' into develop 2021-03-31 15:50:55 +01:00
ddd79d38fe
API Resources and first endpoints 2021-03-31 03:55:09 +01:00
6d94263ede
JSON response provider 2021-03-29 23:47:55 +01:00
Miguel N
3a56d2bfb2 Removed 100 character limit from submissions 2021-01-29 16:27:39 +00:00
abace4e85b
Setting categorization system
This categorization system aims to prevent mixing different options together.
2021-01-06 01:29:01 +00:00
baddf3fc76
Save value instead of raw model to cache 2021-01-06 01:02:47 +00:00
6518ad3447
Fixed #2
This method would always fail for cached options because at the end it was expecting an Eloquent model, which would never be populated if the requested value was cached in the first place.

Uncached requests wouldn't fail because the exec path would lead to $value being a Model.

Also removed reference to old feature causing application page to crash.
2020-12-08 00:07:53 +00:00
96aa01b9c6 Recent changes 2020-11-02 21:44:05 +00:00
6541e25a39 Apply fixes from StyleCI 2020-10-10 16:30:26 +00:00
27b1f3170b Update settings log level 2020-08-31 20:02:30 +01:00
2afea88846 Added logging to Settings 2020-08-31 19:47:27 +01:00
ea96cbc1f5 Options: return value instead of whole model 2020-08-31 18:54:33 +01:00
2996e66c8b Add missing query builder statement for options 2020-08-31 18:51:35 +01:00
ca82f5882d Add settings page 2020-08-30 23:06:01 +01:00
5f1f92a9ce Code review
This commit fixes some superficial instances of Broken Access Control 
(https://owasp.org/www-project-top-ten/OWASP_Top_Ten_2017/Top_10-2017_A5-Broken_Access_Control).
There may be some more instances of this, as authorization was only done 
after most of the controllers were done (big mistake).

Some refactoring was also performed, where Route Model Binding with DI 
(dependency injection) was used whenever possible, to increase 
testability of the codebase.
Some reused code was also moved to Helper classes as to enforce DRY; 
There may be some lines of code that are still copy-pasted from other 
parts of the codebase for reuse.

Non-breaking refactoring changes were made, but the app as a whole still 
needs full manual testing, and customised responses to HTTP 500 
responses. Some errors are also not handled gracefully and this wasn't 
checked in this commit.
2020-07-16 21:21:28 +01:00
bca6020ab0 Add ability to edit forms and add new fields
This commit adds the ability to edit and modify existing forms.
On the technical side, it also adds a new reusable validation Facade which helps reduce duplicated code.
2020-07-15 06:48:49 +01:00