* initial commit
This commit is contained in:
2
config/autoload/.gitignore
vendored
Normal file
2
config/autoload/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
local.php
|
||||
*.local.php
|
||||
93
config/autoload/authx2.global.php
Normal file
93
config/autoload/authx2.global.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Authorization, authentication config
|
||||
*/
|
||||
|
||||
return [
|
||||
'acl_config' => [
|
||||
'unguarded_routes' => [
|
||||
'api.auth.login',
|
||||
'api.ping',
|
||||
'api.xlsx',
|
||||
'show-attachment',
|
||||
'hibajegy-pdf',
|
||||
'karbantartasjegy-pdf',
|
||||
'havi-riport-pdf',
|
||||
],
|
||||
|
||||
'route_guard' => [
|
||||
'roles' => [
|
||||
/**
|
||||
* child role => parents[]
|
||||
* parentrole has all child roles permissions
|
||||
* order of roles DO matter, referenced parents MUST exist, so should be defined first
|
||||
*/
|
||||
// karbantartó oldal
|
||||
'uzemeltetesi_vezeto' => [
|
||||
'ufo',
|
||||
],
|
||||
'betekinto' => [
|
||||
'uzemeltetesi_vezeto',
|
||||
],
|
||||
// ügyfél oldal
|
||||
'karbantarto' => [
|
||||
'projektvezeto'
|
||||
],
|
||||
'user' => [
|
||||
'betekinto',
|
||||
'karbantarto',
|
||||
],
|
||||
],
|
||||
'permissions' => [
|
||||
// 'admin' role has full access
|
||||
'uzemeltetesi_vezeto' => [
|
||||
'api.fault.post',
|
||||
'api.fault.put',
|
||||
'api.report.post',
|
||||
'api.fault-attachment.post',
|
||||
'api.fault-comment.post',
|
||||
'api.fault-reject.post',
|
||||
'api.maintenance',
|
||||
'api.maintenance.upcoming'
|
||||
],
|
||||
'ufo' => [
|
||||
'api.fault.put',
|
||||
'api.fault-attachment.post',
|
||||
'api.fault-comment.post',
|
||||
'api.fault-reject.post',
|
||||
],
|
||||
// 'betekinto' => [
|
||||
// 'api.fault.get',
|
||||
// ],
|
||||
|
||||
'projektvezeto' => [
|
||||
'api.fault.put',
|
||||
'api.report.post',
|
||||
'api.fault-attachment.post',
|
||||
'api.fault-comment.post',
|
||||
'api.maintenance',
|
||||
'api.maintenance.put',
|
||||
'api.maintenance.upcoming',
|
||||
],
|
||||
'karbantarto' => [
|
||||
],
|
||||
// anybody logged in has the 'user' meta role, its not assignable otherwise
|
||||
// api endpoints defined here are accessible to all authenticated users
|
||||
'user' => [
|
||||
'api.auth.renew',
|
||||
'api.user.list',
|
||||
'api.user.profile',
|
||||
'api.user.password',
|
||||
// 'api.settings.post',
|
||||
'api.error-category.get',
|
||||
'api.error-origin.get',
|
||||
'api.facility-location.get',
|
||||
'api.solution-time-interval.get',
|
||||
'api.fault.get',
|
||||
'show-attachment',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
19
config/autoload/cli.global.php
Normal file
19
config/autoload/cli.global.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'dependencies' => [
|
||||
'invokables' => [],
|
||||
'factories' => [
|
||||
App\Command\InitializeFixtureCommand::class => App\Command\InitializeFixtureCommandFactory::class,
|
||||
// App\Command\ConvertMaintenanceHashCommand::class => App\Command\ConvertMaintenanceHashCommandFactory::class,
|
||||
// App\Command\MailTestCommand::class => App\Command\MailTestCommandFactory::class,
|
||||
],
|
||||
],
|
||||
'console' => [
|
||||
'commands' => [
|
||||
App\Command\InitializeFixtureCommand::class,
|
||||
// App\Command\ConvertMaintenanceHashCommand::class,
|
||||
// App\Command\MailTestCommand::class,
|
||||
],
|
||||
],
|
||||
];
|
||||
43
config/autoload/dependencies.global.php
Normal file
43
config/autoload/dependencies.global.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Zend\Expressive\Application;
|
||||
use Zend\Expressive\Container;
|
||||
use Zend\Expressive\Delegate;
|
||||
use Zend\Expressive\Helper;
|
||||
use Zend\Expressive\Middleware;
|
||||
|
||||
return [
|
||||
// Provides application-wide services.
|
||||
// We recommend using fully-qualified class names whenever possible as
|
||||
// service names.
|
||||
'dependencies' => [
|
||||
// Use 'aliases' to alias a service name to another service. The
|
||||
// key is the alias name, the value is the service to which it points.
|
||||
'aliases' => [
|
||||
'Zend\Expressive\Delegate\DefaultDelegate' => Delegate\NotFoundDelegate::class,
|
||||
],
|
||||
// Use 'invokables' for constructor-less services, or services that do
|
||||
// not require arguments to the constructor. Map a service name to the
|
||||
// class name.
|
||||
'invokables' => [
|
||||
// Fully\Qualified\InterfaceName::class => Fully\Qualified\ClassName::class,
|
||||
Helper\ServerUrlHelper::class => Helper\ServerUrlHelper::class,
|
||||
],
|
||||
// Use 'factories' for services provided by callbacks/factory classes.
|
||||
'factories' => [
|
||||
Application::class => Container\ApplicationFactory::class,
|
||||
Delegate\NotFoundDelegate::class => Container\NotFoundDelegateFactory::class,
|
||||
Helper\ServerUrlMiddleware::class => Helper\ServerUrlMiddlewareFactory::class,
|
||||
Helper\UrlHelper::class => Helper\UrlHelperFactory::class,
|
||||
Helper\UrlHelperMiddleware::class => Helper\UrlHelperMiddlewareFactory::class,
|
||||
|
||||
Zend\Stratigility\Middleware\ErrorHandler::class => Container\ErrorHandlerFactory::class,
|
||||
Middleware\ErrorResponseGenerator::class => Container\ErrorResponseGeneratorFactory::class,
|
||||
Middleware\NotFoundHandler::class => Container\NotFoundHandlerFactory::class,
|
||||
|
||||
Slim\Middleware\JwtAuthentication::class => App\Middleware\JwtAuthenticationFactory::class,
|
||||
Tuupola\Middleware\Cors::class => App\Middleware\CorsMiddlewareFactory::class,
|
||||
App\Middleware\RouteAuthorization::class => App\Middleware\RouteAuthorizationFactory::class,
|
||||
],
|
||||
],
|
||||
];
|
||||
34
config/autoload/development.local.php.dist
Normal file
34
config/autoload/development.local.php.dist
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Development-only configuration.
|
||||
*
|
||||
* Put settings you want enabled when under development mode in this file, and
|
||||
* check it into your repository.
|
||||
*
|
||||
* Developers on your team will then automatically enable them by calling on
|
||||
* `composer development-enable`.
|
||||
*/
|
||||
|
||||
use Zend\Expressive\Container;
|
||||
use Zend\Expressive\Middleware\ErrorResponseGenerator;
|
||||
|
||||
return [
|
||||
'dependencies' => [
|
||||
'invokables' => [
|
||||
],
|
||||
'factories' => [
|
||||
ErrorResponseGenerator::class => Container\WhoopsErrorResponseGeneratorFactory::class,
|
||||
'Zend\Expressive\Whoops' => Container\WhoopsFactory::class,
|
||||
'Zend\Expressive\WhoopsPageHandler' => Container\WhoopsPageHandlerFactory::class,
|
||||
],
|
||||
],
|
||||
|
||||
'whoops' => [
|
||||
'json_exceptions' => [
|
||||
'display' => true,
|
||||
'show_trace' => true,
|
||||
'ajax_only' => true,
|
||||
],
|
||||
],
|
||||
];
|
||||
74
config/autoload/doctrine.global.php
Normal file
74
config/autoload/doctrine.global.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'dependencies' => [
|
||||
'factories' => [
|
||||
'doctrine.entity_manager.orm_default' => ContainerInteropDoctrine\EntityManagerFactory::class,
|
||||
'doctrine.hydrator' => App\Hydrator\DoctrineObjectFactory::class,
|
||||
],
|
||||
],
|
||||
'doctrine' => [
|
||||
'driver' => [
|
||||
'orm_default' => [
|
||||
'class' => Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain::class,
|
||||
'drivers' => [
|
||||
'App\Entity' => 'app_entity',
|
||||
],
|
||||
],
|
||||
'app_entity' => [
|
||||
'class' => Doctrine\ORM\Mapping\Driver\AnnotationDriver::class,
|
||||
'cache' => 'array',
|
||||
'paths' => __DIR__ . '/../../src/App/Entity',
|
||||
],
|
||||
],
|
||||
'configuration' => [
|
||||
'orm_default' => [
|
||||
// 'datetime_functions' => [
|
||||
// 'date' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'time' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'timestamp' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'convert_tz' => Oro\ORM\Query\AST\Functions\DateTime\ConvertTz::class,
|
||||
// ],
|
||||
'numeric_functions' => [
|
||||
// 'timestampdiff' => Oro\ORM\Query\AST\Functions\Numeric\TimestampDiff::class,
|
||||
// 'dayofyear' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'dayofmonth' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'dayofweek' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'week' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'day' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'hour' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'minute' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
'month' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'quarter' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'second' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
'year' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'sign' => Oro\ORM\Query\AST\Functions\Numeric\Sign::class,
|
||||
// 'pow' => Oro\ORM\Query\AST\Functions\Numeric\Pow::class,
|
||||
],
|
||||
// 'string_functions' => [
|
||||
// 'md5' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'group_concat' => Oro\ORM\Query\AST\Functions\String\GroupConcat::class,
|
||||
// 'cast' => Oro\ORM\Query\AST\Functions\Cast::class,
|
||||
// 'concat_ws' => Oro\ORM\Query\AST\Functions\String\ConcatWs::class
|
||||
// ]
|
||||
// 'filters' => [
|
||||
// 'soft-deleteable' => Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter::class,
|
||||
// ],
|
||||
],
|
||||
],
|
||||
'event_manager' => [
|
||||
'orm_default' => [
|
||||
'subscribers' => [
|
||||
Gedmo\Timestampable\TimestampableListener::class,
|
||||
Gedmo\Tree\TreeListener::class,
|
||||
// Gedmo\SoftDeleteable\SoftDeleteableListener::class,
|
||||
// Gedmo\Translatable\TranslatableListener::class,
|
||||
// Gedmo\Blameable\BlameableListener::class,
|
||||
// Gedmo\Loggable\LoggableListener::class,
|
||||
// Gedmo\Sortable\SortableListener::class,
|
||||
// Gedmo\Sluggable\SluggableListener::class,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
14
config/autoload/doctrine.local.dist.php
Normal file
14
config/autoload/doctrine.local.dist.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'doctrine' => [
|
||||
'connection' => [
|
||||
'orm_default' => [
|
||||
'params' => [
|
||||
'url' => 'sqlite:///data/app.db',
|
||||
'charset' => 'UTF8',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
27
config/autoload/local.php.dist
Normal file
27
config/autoload/local.php.dist
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Local configuration.
|
||||
*
|
||||
* Copy this file to `local.php` and change its settings as required.
|
||||
* `local.php` is ignored by git and safe to use for local and sensitive data like usernames and passwords.
|
||||
*/
|
||||
|
||||
return [
|
||||
'self' => [
|
||||
'name' => 'Laterex Üzemeltető Kft.',
|
||||
'address' => '1095 Budapest, Hídépítő utca 1-12.',
|
||||
'tax_number' => '25398791-2-43',
|
||||
'sender' => 'nobody@localhost',
|
||||
'site-uri' => 'localhost',
|
||||
],
|
||||
'client' => [
|
||||
'short' => 'XXII. kerület',
|
||||
'name' => 'Budafok-Tétény, Budapest, XXII. kerületi Önkormányzat',
|
||||
'address' => '1221 Budapest, Városház tér 11.',
|
||||
'tax_number' => '15735856-2-43',
|
||||
],
|
||||
'acl_config' => [
|
||||
'hmac_key' => '',
|
||||
],
|
||||
];
|
||||
29
config/autoload/mail.local.dist.php
Normal file
29
config/autoload/mail.local.dist.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Zend\Mail\Transport\File;
|
||||
use Zend\Mail\Transport\FileOptions;
|
||||
|
||||
//use Zend\Mail\Transport\Smtp;
|
||||
//use Zend\Mail\Transport\SmtpOptions;
|
||||
|
||||
return [
|
||||
'mailer' => [
|
||||
// 'transportClass' => Smtp::class,
|
||||
// 'optionsClass' => SmtpOptions::class,
|
||||
// 'options' => [
|
||||
// 'name' => 'localhost',
|
||||
// 'host' => '127.0.0.1',
|
||||
// 'port' => 25,
|
||||
// 'connection_class' => 'plain',
|
||||
// 'connection_config' => [
|
||||
// 'username' => 'user',
|
||||
// 'password' => 'pass',
|
||||
// ],
|
||||
// ],
|
||||
'transportClass' => File::class,
|
||||
'optionsClass' => FileOptions::class,
|
||||
'options' => [
|
||||
'path' => 'data/mail/',
|
||||
],
|
||||
]
|
||||
];
|
||||
12
config/autoload/router.global.php
Normal file
12
config/autoload/router.global.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
use Zend\Expressive\Router\FastRouteRouter;
|
||||
use Zend\Expressive\Router\RouterInterface;
|
||||
|
||||
return [
|
||||
'dependencies' => [
|
||||
'invokables' => [
|
||||
RouterInterface::class => FastRouteRouter::class,
|
||||
],
|
||||
],
|
||||
];
|
||||
27
config/autoload/zend-expressive.global.php
Normal file
27
config/autoload/zend-expressive.global.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Zend\ConfigAggregator\ConfigAggregator;
|
||||
|
||||
return [
|
||||
// Toggle the configuration cache. Set this to boolean false, or remove the
|
||||
// directive, to disable configuration caching. Toggling development mode
|
||||
// will also disable it by default; clear the configuration cache using
|
||||
// `composer clear-config-cache`.
|
||||
ConfigAggregator::ENABLE_CACHE => true,
|
||||
|
||||
// Enable debugging; typically used to provide debugging information within templates.
|
||||
'debug' => false,
|
||||
|
||||
'zend-expressive' => [
|
||||
// Enable programmatic pipeline: Any `middleware_pipeline` or `routes`
|
||||
// configuration will be ignored when creating the `Application` instance.
|
||||
'programmatic_pipeline' => true,
|
||||
|
||||
// Provide templates for the error handling middleware to use when
|
||||
// generating responses.
|
||||
'error_handler' => [
|
||||
'template_404' => 'error::404',
|
||||
'template_error' => 'error::error',
|
||||
],
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user