| Current Path : /var/www/html/csm/backend/config/ |
| Current File : /var/www/html/csm/backend/config/main.php |
<?php
$params = array_merge(
require(__DIR__ . '/../../common/config/params.php'), require(__DIR__ . '/../../common/config/params-local.php'), require(__DIR__ . '/params.php'), require(__DIR__ . '/params-local.php')
);
return [
'language' => 'English',
'id' => 'app-backend',
'basePath' => dirname(__DIR__),
'controllerNamespace' => 'backend\controllers',
'bootstrap' => [
'backend\modules\installer\SiteBootstrap',
'dynamicModules' => [
'class' => 'common\components\DynamicModules',
],
'log'
],
'modules' => [
'appStatistics' => ['class' => 'backend\modules\appStatistics\Module'],//new added
'whistleblowing' => ['class' => 'backend\modules\whistleblowing\Module'],//new added
'job_application' => ['class' => 'backend\modules\job_application\Module'],//new added
'committee_members' => ['class' => 'backend\modules\committee_members\Module'],//new added
'appointment' => [
'class' => 'backend\modules\appointment\Module'
],
'contentJournal' => [
'class' => 'backend\modules\contentJournal\Module'
],
'contentEvent' => [
'class' => 'backend\modules\contentEvent\Module'
],
'pageVisitLog' => [
'class' => 'backend\modules\pageVisitLog\Module'
],
'procurement' => [
'class' => 'backend\modules\procurement\Module'
],
'installer' => [
'class' => 'backend\modules\installer\InstallerModule'
],
'mmngr' => [
'class' => 'backend\modules\mmngr\Module'
],
'mimin' => [
'class' => 'backend\modules\mimin\Module'
],
'menu' => [
'class' => 'backend\modules\menu\Module',
],
'theme' => [
'class' => 'backend\modules\theme\Module',
],
'gridview' => [
'class' => '\kartik\grid\Module'
// enter optional module parameters below - only if you need to
// use your own export download action or custom translation
// message source
// 'downloadAction' => 'gridview/export/download',
// 'i18n' => []
],
'as access' => [
'class' => 'backend\modules\mimin\components\AccessControl',
'allowActions' => [
// add wildcard allowed action here!
'site/*',
'debug/*',
'mimin/*', // only in dev mode
'installer/*'
],
],
'audit' => [
'class' => 'bedezign\yii2\audit\Audit',
// the layout that should be applied for views within this module
'layout' => '/audit',
// Name of the component to use for database access
'db' => 'db',
// List of actions to track. '*' is allowed as the last character to use as wildcard
'trackActions' => ['*'],
// Actions to ignore. '*' is allowed as the last character to use as wildcard (eg 'debug/*')
'ignoreActions' => ['audit/*', 'debug/*', 'site/*', 'dashboard/*', 'installer/*'],
// Maximum age (in days) of the audit entries before they are truncated
'maxAge' => 'debug',
// IP address or list of IP addresses with access to the viewer, null for everyone (if the IP matches)
'accessIps' => ['127.0.0.1', '192.168.*'],
// Role or list of roles with access to the viewer, null for everyone (if the user matches)
'accessRoles' => ['super-admin'],
// User ID or list of user IDs with access to the viewer, null for everyone (if the role matches)
// 'accessUsers' => [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],
// Compress extra data generated or just keep in text? For people who don't like binary data in the DB
'compressData' => true,
// The callback to use to convert a user id into an identifier (username, email, ...). Can also be html.
'userIdentifierCallback' => ['backend\models\User', 'userIdentifierCallback'],
// If the value is a simple string, it is the identifier of an internal to activate (with default settings)
// If the entry is a '<key>' => '<string>|<array>' it is a new panel. It can optionally override a core panel or add a new one.
// 'panels' => [
// 'audit/request',
// 'audit/error',
// 'audit/trail',
// 'app/views' => [
// 'class' => 'app\panels\ViewsPanel',
// ...
// ],
// ],
// 'panelsMerge' => [
// ... merge data (see below)
// ]
],
// 'debug' => [
// 'class' => \yii\debug\Module::class,
// 'panels' => [
// 'queue' => \yii\queue\debug\Panel::class,
// ],
// ],
],
'components' => [
'user' => [
'identityClass' => 'common\models\User',
'enableAutoLogin' => true,
'identityCookie' => [
'name' => '_backendIdentity',
],
],
'session' => [
'name' => 'BACKENDSESSIDBANCI',
'savePath' => __DIR__ . '/../runtime',
],
'request' => [
'cookieValidationKey' => '0okmnji98uhbBANCI',
'csrfParam' => '_backendCSRF',
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'errorHandler' => [
'errorAction' => 'site/error',
],
'authManager' => [
'class' => 'yii\rbac\DbManager', // only support DbManager
'defaultRoles' => ['guest'],
],
// 'ad' => [
// 'class' => 'Edvlerblog\Adldap2\Adldap2Wrapper',
// /*
// * Set the default provider to one of the providers defined in the
// * providers array.
// *
// * If this is commented out, the entry 'default' in the providers array is
// * used.
// *
// * See https://github.com/Adldap2/Adldap2/blob/master/docs/connecting.md
// * Setting a default connection
// *
// */
// // 'defaultProvider' => 'another_provider',
// /*
// * Adlapd2 can handle multiple providers to different Active Directory sources.
// * Each provider has it's own config.
// *
// * In the providers section it's possible to define multiple providers as listed as example below.
// * But it's enough to only define the "default" provider!
// */
// 'providers' => [
// /*
// * Always add a default provider!
// *
// * You can get the provider with:
// * $provider = \Yii::$app->ad->getDefaultProvider();
// * or with $provider = \Yii::$app->ad->getProvider('default');
// */
// 'default' => [ //Providername default
// // Connect this provider on initialisation of the LdapWrapper Class automatically
// 'autoconnect' => true,
// // The provider's schema. Default is \Adldap\Schemas\ActiveDirectory set in https://github.com/Adldap2/Adldap2/blob/master/src/Connections/Provider.php#L112
// // You can make your own https://github.com/Adldap2/Adldap2/blob/master/docs/schema.md or use one from https://github.com/Adldap2/Adldap2/tree/master/src/Schemas
// // Example to set it to OpenLDAP:
// // 'schema' => new \Adldap\Schemas\OpenLDAP(),
// // The config has to be defined as described in the Adldap2 documentation.
// // https://github.com/Adldap2/Adldap2/blob/master/docs/configuration.md
// 'config' => [
// // Your account suffix, for example: matthias.maderer@example.lan
// 'account_suffix' => '@dynawebwork.com',
// // You can use the host name or the IP address of your controllers.
// 'hosts' => ['jolly-fog-57422.pktriot.net'],
// // Your base DN. This is usually your account suffix.
// 'base_dn' => 'OU=example,DC=dynawebwork,DC=com',
// // The account to use for querying / modifying users. This
// // does not need to be an actual admin account.
// 'username' => 'superadmin',
// 'password' => 'Secure92@0258',
// // To enable SSL/TLS read the docs/SSL_TLS_AD.md and uncomment
// // the variables below
// 'port' => 22886,
// //'use_ssl' => true,
// //'use_tls' => true,
// ]
// ],
// /*
// * Another Provider
// * You don't have to define another provider if you don't need it. It's just an example.
// *
// * You can get the provider with:
// * or with $provider = \Yii::$app->ad->getProvider('another_provider');
// */
// 'another_provider' => [ //Providername another_provider
// // Connect this provider on initialisation of the LdapWrapper Class automatically
// 'autoconnect' => false,
// // The provider's schema. Default is \Adldap\Schemas\ActiveDirectory set in https://github.com/Adldap2/Adldap2/blob/master/src/Connections/Provider.php#L112
// // You can make your own https://github.com/Adldap2/Adldap2/blob/master/docs/schema.md or use one from https://github.com/Adldap2/Adldap2/tree/master/src/Schemas
// // Example to set it to OpenLDAP:
// // 'schema' => new \Adldap\Schemas\OpenLDAP(),
// // The config has to be defined as described in the Adldap2 documentation.
// // https://github.com/Adldap2/Adldap2/blob/master/docs/configuration.md
// 'config' => [
// // Your account suffix, for example: matthias.maderer@test.lan
// 'account_suffix' => '@test.lan',
// // You can use the host name or the IP address of your controllers.
// 'hosts' => ['server1.test.lan', 'server2'],
// // Your base DN. This is usually your account suffix.
// 'base_dn' => 'dc=test,dc=lan',
// // The account to use for querying / modifying users. This
// // does not need to be an actual admin account.
// 'username' => 'username_ldap_access@test.lan',
// 'password' => 'password_ldap_access',
// // To enable SSL/TLS read the docs/SSL_TLS_AD.md and uncomment
// // the variables below
// //'port' => 636,
// //'use_ssl' => true,
// //'use_tls' => true,
// ] // close config
// ], // close provider
// ], // close providers array
// ], //close ad
],
'aliases' => [
],
'controllerMap' => [
'elfinder' => [
'class' => 'mihaildev\elfinder\Controller',
'access' => ['@'],
'managerOptions' => [
'ui' => ['toolbar', 'tree', 'path', 'stat'],
'cssAutoLoad' => ['material/css/theme.css']
],
'disabledCommands' => ['netmount'],
'roots' => [
[
'baseUrl' => '@web',
'basePath' => '@webroot',
'path' => '../assets',
'name' => 'Assets'
],
],
]
],
'params' => $params,
];