Commit Graph

123 Commits (b03102e3c613bd057f117a145d94aec4c977006c)

Author SHA1 Message Date
Igor Scheller fece50ca09 Basic coverage tests of logger classes for 100% unit tests coverage
Igor Scheller b25924e868 Allow nested rules (not and optional)
Igor Scheller 6743106d9a Replaced validation with `respect/validation`
Igor Scheller 6d5ada2522 Added validation to AuthController
Igor Scheller 7414f9b23d Implemented Validation for controllers
Igor Scheller 508695efb2 Replaced gettext translation with package
This allows to check if no translation is available
Igor Scheller f90ab26fee Moved translation helpers to sub namespace
Igor Scheller e9f157ec5c Renderer: Added shared data
Igor Scheller bcce2625a8 Implemented AuthController for login
* Moved /login functionality to AuthController
* Refactored password handling logic to use the Authenticator
Igor Scheller e06affae17 Added tests to HomeController
Igor Scheller 6ed891fc04 Added logout via AuthController
Igor Scheller 2e51fbff9d Added / route with redirects
Igor Scheller e948091066 Replaced old /api endpoint with ApiController
Igor Scheller 93e578e555 Added html content sniffer
Igor Scheller 1f433694d2 Tests: Fix type warning
Igor Scheller 236197faf8 Upgraded external components
Igor Scheller 819677c902 Use self references and fix class naming
Igor Scheller 8da8805f5d Replaced functions with mb_* equivalents
Igor Scheller 79c92da8c1 Formatting
```bash
php-cs-fixer fix --allow-risky=yes --rules=@PSR2,psr4,mb_str_functions.php_unit_construct,php_unit_ordered_covers,trailing_comma_in_multiline_array --rules='{"array_syntax": {"syntax":"short"}}' [tests/|src/]
```
Igor Scheller 9930668837 Fixed test coverage
Igor Scheller c74fa7955d phpunit: Upgrade to version 8, fixed tests, formatting
Use `dms/phpunit-arraysubset-asserts` after `assertArraySubset` got deprecated
Igor Scheller 58ca7113f3 PSR-7: Replaced implementation with `Nyholm\Psr7`
Igor Scheller d9f898a0bb Bugfix: Replaced Diactoros with Symfony PsrHttpFactory to use PhpExtended\HttpMessage implementation
Prevents warnings that get converted to errors when run in dev mode
Igor Scheller 43b7b5c117 migration: Exclude add_angel_supporter_permissions from unit tests
Igor Scheller 491ee37651 Don't save sessions permanently on api and metrics paths
closes  (Session on API calls)
Igor Scheller b1d8fede46 user: allow up to 40 characters for dect numbers
closes  (EPVPN number in DECT field is shortened)
closes  (For dect numbers are only 5 digits allowed)
Igor Scheller 330356043d credits: Allow customization
Igor Scheller 393db49294 Renderer: Added twig extension for markdown rendering
Igor Scheller b3f059ad04 metrics: Added vouchers and tshirts
Igor Scheller 9a2f246511 metrics: Added more stats
Igor Scheller c5621b82cf Implemented /metrics endpoint and reimplemented /stats
closes  (/metrics endpoint)

Usage:
```yaml
scrape_configs:
  - job_name: 'engelsystem'
    static_configs:
    - targets: ['engelsystem.example.com:80']
```
Igor Scheller 3c8d0eeb44 ErrorHandler: Don't wrap the response if a content-type is defined
Igor Scheller c9d7e88cc7 Implemented controller permissions
Igor Scheller 55beca95cd Refactoring: Throw HttpAuthExpired on csrf token mismatch
Igor Scheller 9788c5095a Implemented HttpException
Igor Scheller c33940f64a Moved permission checks to Authenticator class
Igor Scheller f845a5ab8b Added caching for templating and routing
See  (Implement caching)
Igor Scheller 944c29b964 Require POST for sending forms
* Ensure that the form is submitted with a post request
* Replaced several links with forms

Closes  (Security Vulnerability)
Igor Scheller fd37c9d60e Added additional headers
Igor Scheller 23c0fae36f Added csrf middleware
Igor Scheller 4e09ee3eb2 Replaced more user related stuff
(Contains some buggy stuff too...)
Igor Scheller 2dcb7cc2de Replaced some global `$user` variables
Igor Scheller d15946df2d Changed `src/` code and templates to use the new user model
Igor Scheller 8e62c4c52c Added new user models
Igor Scheller b443b53919 Translation: added pluralization support
Igor Scheller 90e1a94962 Make application name configurable
* Added app_name configuration option
* Extended `EngelsystemMailer` to prepend the application name to all mails

Closes 
Igor Scheller 7f61dc95be EventConfig: Merge event configuration from database to global config
Igor Scheller 63d1292bf8 Added EventConfig model
Igor Scheller c4867811e2 BaseModel: Added findOrNew
Igor Scheller c9afc27ab9 Tests: Moved ServiceProvider::setExpects to TestCase