Commit Graph

19 Commits

Author SHA1 Message Date
3f4bc28fd4
Added Demo mode
Demo mode allows to safely run a demo version of the app, with destructive features limited.

Some bugs were also fixed in this commit.
2021-09-04 00:44:54 +01:00
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
620453c1e4
Separation of Concerns + old coude cleanup 2021-07-20 00:35:03 +01:00
Miguel N
685ec75d0c Reverse 2021-01-27 02:31:57 +00:00
Miguel N
d234415d38 Logic changes for confirmation dialog
This commit changes the deletion mechanism for forms. Currently, it sets the wanted deletion ID to the session, and redirects the user to the previous page, to open a confirmation dialog for deletion.
2021-01-27 02:23:30 +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
6cc99d2ebe Prevent empty form creation 2020-10-09 00:56:11 +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
1f50faaea7 Add ability to preview application 2020-07-12 19:36:12 +01:00
4dc412e53c Added check for constrained models when deleting 2020-07-12 06:39:39 +01:00
33c16fcf46 Add user directory & isolate authorisation 2020-06-27 19:15:33 +01:00
290104eea7 Added view forms 2020-05-07 00:36:33 +01:00
f52b249834 Error and success messages from form builder 2020-05-06 23:16:34 +01:00
8d79345095 Store form structure in DB 2020-05-06 05:42:55 +01:00
2df5bf144d Added save function to save button
This commit also improves how forms are parsed by PHP by passing them as arrays, therefore making them easier to process.
Note: One of the files contains a debug statement that will be removed in the next commit
2020-05-06 03:44:39 +01:00
79eaa2ea54 Add dynamic form builder
This form builder still needs some improvements and names for every field.
2020-05-05 05:25:56 +01:00
7c22894e94 Added models, migrations and controllers
This commit adds the logical structure for the app.
2020-04-29 18:15:54 +01:00