-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCONFIG.fallback.php
56 lines (46 loc) · 2.02 KB
/
CONFIG.fallback.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
// define relative path to your root folder
if (!defined('ROOTPATH'))
define('ROOTPATH', '');
// define ADMIN user name
if (!defined('ADMIN'))
define('ADMIN', '');
if (!defined('USER_MANAGEMENT'))
define('USER_MANAGEMENT', 'AUTH');
if (!defined('LIVE'))
define('LIVE', true);
// define LDAP connection
if (USER_MANAGEMENT == 'LDAP') {
if (!defined('LDAP_IP'))
die("Error in your CONFIG: USER_MANAGEMENT is set to LDAP, but LDAP_IP is not set.");
if (!defined('LDAP_PORT'))
die("Error in your CONFIG: USER_MANAGEMENT is set to LDAP, but LDAP_PORT is not set.");
if (!defined('LDAP_USER'))
die("Error in your CONFIG: USER_MANAGEMENT is set to LDAP, but LDAP_USER is not set.");
if (!defined('LDAP_DOMAIN'))
die("Error in your CONFIG: USER_MANAGEMENT is set to LDAP, but LDAP_DOMAIN is not set.");
if (!defined('LDAP_PASSWORD'))
die("Error in your CONFIG: USER_MANAGEMENT is set to LDAP, but LDAP_PASSWORD is not set.");
if (!defined('LDAP_BASEDN'))
die("Error in your CONFIG: USER_MANAGEMENT is set to LDAP, but LDAP_BASEDN is not set.");
if (!defined('LDAP_FILTER'))
// z.B. for filtering by group: (&(memberOf=CN=GroupName,OU=Groups,DC=example,DC=com)(objectClass=user))
define('LDAP_FILTER', '(objectClass=user)');
}
// define DB connection
if (!defined('DB_NAME'))
define("DB_NAME", "osiris");
if (!defined('DB_STRING'))
define("DB_STRING", "mongodb://localhost:27017/" . DB_NAME . "?retryWrites=true&w=majority");
// define API keys
if (!defined('WOS_STARTER_KEY'))
define("WOS_STARTER_KEY", "wos starter key");
if (!defined('WOS_JOURNAL_INFO'))
define("WOS_JOURNAL_INFO", 2021);
// not needed right now, but planned in the future
if (!defined('ORCID_APP_ID'))
define("ORCID_APP_ID", null);
if (!defined('ORCID_SECRET_KEY'))
define("ORCID_SECRET_KEY", null);
if (!defined('PORTALPATH'))
define('PORTALPATH', $_GET['path']??(ROOTPATH.'/preview'));