-
Notifications
You must be signed in to change notification settings - Fork 580
/
config.inc.php
2245 lines (1780 loc) · 83.4 KB
/
config.inc.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/**
* TestLink Open Source Project - http://testlink.sourceforge.net/
* This script is distributed under the GNU General Public License 2 or later.
*
* Constants and configuration parameters used throughout TestLink
*
* There are included extra files:
* - your customized settings - custom_config.inc.php
* - DB access - config_db.inc.php
* - constants - const.inc.php
* - basic checking - configCheck.php
*
* IMPORTANT:
* To adapt values to your needs DO NOT EDIT THIS FILE but use custom_config.inc.php and
* replace values of TestLink configuration variables.
* It saves your changes for the next upgrade in one extra file.
*
* @filesource config.inc.php
* @package TestLink
* @copyright 2005-2023, TestLink community
* @link http://www.testlink.org
*
*
**/
// ----------------------------------------------------------------------------
/* [INITIALIZATION] - DO NOT CHANGE THE SECTION */
/** @global array Global configuration class */
$tlCfg = new stdClass();
$tlCfg->api = new stdClass();
$tlCfg->cookie = new stdClass();
$tlCfg->document_generator = new stdClass();
$tlCfg->spec_cfg = new stdClass();
$tlCfg->exec_cfg = new stdClass();
$tlCfg->exec_cfg->view_mode = new stdClass();
$tlCfg->exec_cfg->exec_mode = new stdClass();
$tlCfg->UDFStripHTMLTags = true;
// allow to define additional execution types other than
// defined in testcase.class.php
// array(code => lblkey)
// code int value > latest standard execution code defined.
// lblkey => key to be used on lang_get() call.
//
$tlCfg->custom_execution_types = null;
$tlCfg->gui = new stdClass();
$tlCfg->gui->custom_fields = new stdClass();
$tlCfg->testcase_cfg = new stdClass();
$tlCfg->req_cfg = new stdClass();
$tlCfg->validation_cfg = new stdClass();
$tlCfg->custom_fields = new stdClass();
$tlCfg->req_spec_cfg = new stdClass();
$tlCfg->diffEngine = new stdClass();
$tlCfg->tplanDesign = new stdClass();
$tlCfg->notifications = new stdClass();
$tlCfg->proxy = new stdClass();
$tlCfg->reqTCLinks = new stdClass();
$tlCfg->keywords = new stdClass();
$tlCfg->keywords->annotations = [
"@TestCaseSpecDisplay:"
];
$tlCfg->keywords->onDeleteCheckFrozenTCVersions = TRUE;
$tlCfg->keywords->onDeleteCheckExecutedTCVersions = TRUE;
// main key testproject PREFIX
// element array
// 'addTCLinkIntoITS' true => add note to Issue Tracker to issue with
// ISSUE ID similar to the KEYWORD (see kwPrefix below)
//
// 'kwPrefix' to remove from keyword to create the ISSUE ID
//
$tlCfg->keywords->byTestProject = array();
$tlCfg->keywords->headsUpTSuiteOnExec = 'CMD_OPEN_ON_EXEC';
$tlCfg->accessWithoutLogin = array();
$tlCfg->platforms = new stdClass();
$tlCfg->platforms->allowedOnAssign = [
'enable_on_design' => false,
'enable_on_execution' => true,
'is_open' => true
];
/** @uses database access definition (generated automatically by TL installer) */
@include_once('config_db.inc.php');
if( !defined('DB_TABLE_PREFIX') ) {
define('DB_TABLE_PREFIX','' );
}
/** The root dir for the testlink installation with trailing slash */
define('TL_ABS_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
/** Just for documentation */
$tlCfg->testlinkdotorg = 'http://www.testlink.org';
/** GUI themes (base for CSS and images)- modify if you create own one */
$tlCfg->theme_dir = 'gui/themes/default/';
/** Dir for compiled templates */
$tlCfg->temp_dir = TL_ABS_PATH . 'gui' . DIRECTORY_SEPARATOR .
'templates_c' . DIRECTORY_SEPARATOR;
if (($tpltmp = getenv('TESTLINK_TEMPLATES_C'))) {
$tlCfg->temp_dir = trim($tpltmp);
}
/** default filenames of CSS files of current GUI theme */
define('TL_CSS_MAIN', 'testlink.css');
define('TL_CSS_PRINT', 'tl_print.css');
define('TL_CSS_DOCUMENTS', 'tl_documents.css');
define('TL_THEME_BASE_DIR', $tlCfg->theme_dir);
define('TL_THEME_IMG_DIR', $tlCfg->theme_dir . 'images/');
define('TL_THEME_CSS_DIR', $tlCfg->theme_dir . 'css/');
define('TL_TESTLINK_CSS', TL_THEME_CSS_DIR . TL_CSS_MAIN);
define('TL_PRINT_CSS', TL_THEME_CSS_DIR . TL_CSS_PRINT);
// name of your custom.css, place it in same folder that standard TL css
// null or '' => do not use
$tlCfg->custom_css = null;
/** Include constants and magic numbers (users should not change it)*/
require_once(TL_ABS_PATH . 'cfg' . DIRECTORY_SEPARATOR . 'const.inc.php');
// ----------------------------------------------------------------------------
/** @var string used to have (when needed) a possibility to identify different TL instances
@since 1.9.4 used on mail subject when mail logger is used
*/
$tlCfg->instance_name = 'Main TestLink Instance';
// do not use blanks or special characters, use a short string
$tlCfg->instance_id = 'TLM';
$tlCfg->gui->ux = 'tl-classic';
/**
* Copied from MantisBT
*
* Prefix for all TestLink cookies
* This should be an identifier which does not include spaces or periods,
* and should be unique per TestLink installation, especially if
* $tlCfg->cookie_path is not restricting the cookies' scope to the actual
* TestLink directory.
* @see $tlCfg->cookie->path
* @global string $tlCfg->cookie->prefix
*/
$tlCfg->cookie->prefix = 'TESTLINK1920';
/**
* @link http://php.net/function.setcookie
*
*/
$tlCfg->cookie->expire = (time()+60*60*24*30); // 30 days;
$tlCfg->cookie->domain = '';
$tlCfg->cookie->secure = false;
$tlCfg->cookie->httponly = false;
$tlCfg->cookie->testProjectMemory = $tlCfg->cookie->prefix .
'_PROJ_ID_USER_ID_';
/**
* Copied from MantisBT
*
* Specifies the path under which a cookie is visible
* All scripts in this directory and its sub-directories will be able
* to access TestLink cookies.
* It is recommended to set this to the actual TestLink path.
* @link http://php.net/function.setcookie
* @global string $tlCfg->cookie->path
*/
$tlCfg->cookie->path = '/';
/* [ROLE INHERITANCE] */
/**
* possible values
*
* 'testproject'
* 'global'
*
* 'testproject'
* till a role is specifically assigned to test plan, test plan role
* will be inherited from test project role.
*
* IMPORTANT NOTICE
* test project role can be specifically assigned or inherited from
* user's global role.
*
* if test project specifically assigned role changes, and test plan role was inherited, then it will also changes, due to inheritance.
*
*
* 'global'
* till a role is specifically assigned to test plan, test plan role
* will be inherited from user's global role, and NOT from test project
* specifically assigned role.
*
* if test project specifically assigned role changes, will not be changed.
*
*/
$tlCfg->testplan_role_inheritance_mode = 'testproject';
/* [LOCALIZATION] */
/** @var string Default localization for users */
// The value must be available in $$tlCfg->locales (see cfg/const.inc.php).
// Note: An attempt will be done to establish the default locale
// automatically using $_SERVER['HTTP_ACCEPT_LANGUAGE']
$tlCfg->default_language = 'en_GB';
/**
* @var string Charset 'UTF-8' is only officially supported charset (Require
* MySQL version >= 4.1) 'ISO-8859-1' or another Charset could be set for
* backward compatability by experienced users. However we have not resources
* to support such patches.
**/
$tlCfg->charset = 'UTF-8';
/**
* @var string characters used to surround a description in the user interface
* (for example role)
**/
$tlCfg->gui_separator_open = '[';
$tlCfg->gui_separator_close = ']';
$tlCfg->gui_room = '[ %s ]';
/** @var string Title separators are used when componing an title using several strings */
$tlCfg->gui_title_separator_1 = ' : '; // object : name (Test Specification : My best product)
$tlCfg->gui_title_separator_2 = ' - '; // parent - child
/**
* @var string delimiter used to create DOC ID in this way:
* <test_project_Prefix> . g_testcase_cfg->glue_character . <doc_id>
* Could not be empty
*/
$tlCfg->testcase_cfg->glue_character = '-';
$tlCfg->testcase_cfg->import = new stdClass();
$tlCfg->testcase_cfg->import->wordwrap = new stdClass();
/* 0 => do not apply wordwrap() */
$tlCfg->testcase_cfg->import->wordwrap->summary = 0;
$tlCfg->testcase_cfg->import->wordwrap->preconditions = 0;
$tlCfg->testcase_cfg->import->wordwrap->actions = 0;
$tlCfg->testcase_cfg->import->wordwrap->expected_results = 0;
/**
* fonts set used to draw charts
**/
$tlCfg->charts_font_path = TL_ABS_PATH . "third_party/pchart/Fonts/tahoma.ttf";
/**
* font size used to draw charts
**/
$tlCfg->charts_font_size = 8;
// ----------------------------------------------------------------------------
/* [SERVER ENVIRONMENT] */
/**
* TICKET 4969: Add Setting to Force HTTPS
*/
$tlCfg->force_https = false;
/**
* @var integer Set the session timeout for inactivity [minutes].
* Default high value disables this feature.
*/
$tlCfg->sessionInactivityTimeout = 9900;
/**
* Set the session timeout value (in minutes).
* This will prevent sessions timing out after very short periods of time
* Warning: your server could block this settings
**/
//ini_set('session.cache_expire',900);
/**
* Set the session garbage collection timeout value (in seconds)
* The default session garbage collection in php is set to 1440 seconds (24 minutes)
* If you want sessions to last longer this must be set to a higher value.
* You may need to set this in your global php.ini if the settings don't take effect.
*/
//ini_set('session.gc_maxlifetime', 60*90);
$tlCfg->notifications->userSignUp = new stdClass();
$tlCfg->notifications->userSignUp->enabled = TRUE; // @see notifyGlobalAdmins()
$tlCfg->notifications->userSignUp->to = new stdClass();
$tlCfg->notifications->userSignUp->to->roles = array(TL_ROLES_ADMIN);
$tlCfg->notifications->userSignUp->to->users = null; // i.e. array('login01','login02');
// ----------------------------------------------------------------------------
/* [LOGGING] */
/** Error reporting - do we want php errors to show up for users */
/** configure on custom_config.inc.php */
/** error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_WARNING); */
/** error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING); */
error_reporting(E_ALL);
/** @var string Default level of logging (NONE, ERROR, INFO, DEBUG, EXTENDED)
* is not used by tlLogger, we need to change this in future.
*/
$tlCfg->log_level = 'ERROR';
/** @var boolean show smarty debug window */
$tlCfg->smarty_debug = false;
/**
* @var string Path to store logs -
* for security reasons (see http://itsecuritysolutions.org/2012-08-13-TestLink-1.9.3-multiple-vulnerabilities/)
* put it out of reach via web or configure access denied.
*/
$tlCfg->log_path = '/var/testlink/logs/'; /* unix example */
if (($lp = getenv('TESTLINK_LOG_PATH'))) {
$tlCfg->log_path = trim($lp);
}
/**
* @var string How to warning user when security weak points exists.
*
* 'SCREEN': messages will displayed on login screen, and tl desktop
* 'FILE': a file with a list is created but users are not notified via GUI
* user will receive a message on screen. (default)
* 'SILENT': same that FILE, but user will not receive message on screen.
*/
$tlCfg->config_check_warning_mode = 'FILE';
/**
* ONCE_FOR_SESSION
* ALWAYS
*/
$tlCfg->config_check_warning_frequence = 'ONCE_FOR_SESSION';
/**
*
*/
$tlCfg->userDocOnDesktop = OFF;
/**
* Configure if individual logging data stores are enabled of disabled
* Possibile values to identify loggers: 'db','file'
* $g_loggerCfg=null; all loggers enabled
* $g_loggerCfg['db']['enable']=true/false;
* $g_loggerCfg['file']['enable']=true/false;
* $g_loggerCfg['mail']['enable']=true/false;
*/
$g_loggerCfg = array('mail' => array('enable' => false));
/** @var integer All events older this value [days] are removed from the db, during login */
$g_removeEventsOlderThan = 30;
/** @var map keys: 'all' + values present on proprety of logger class $loggerTypeDomain
* values can be only these defined on logger.class.php
* @since 1.9.4
* example array('all' => array('INFO','AUDIT'),
* 'mail' => array('ERROR'))
*
* $tlCfg->loggerFilter = array('db' => array('DEBUG','AUDIT','WARNING','ERROR'),
* 'file' => array('NONE'));
*
*/
$tlCfg->loggerFilter = null; // default defined on logger.class.php ;
// ----------------------------------------------------------------------------
/* [SMTP] */
/**
* @var string SMTP server name or IP address ("localhost" should work in the most cases)
* Configure using custom_config.inc.php
* @uses lib/functions/email_api.php
*/
$g_smtp_host = '[smtp_host_not_configured]'; # SMTP server MUST BE configured
# Configure using custom_config.inc.php
$g_tl_admin_email = '[testlink_sysadmin_email_not_configured]'; # for problem/error notification
$g_from_email = '[from_email_not_configured]'; # email sender
$g_return_path_email = '[return_path_email_not_configured]';
/**
* Email notification priority (low by default)
* Urgent = 1, Not Urgent = 5, Disable = 0
**/
$g_mail_priority = 5;
/**
* Taken from mantis for phpmailer config
* select the method to mail by:
* PHPMAILER_METHOD_MAIL - mail()
* PHPMAILER_METHOD_SENDMAIL - sendmail
* PHPMAILER_METHOD_SMTP - SMTP
*/
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
/** Configure only if SMTP server requires authentication */
$g_smtp_username = ''; # user
$g_smtp_password = ''; # password
/**
* This control the connection mode to SMTP server.
* Can be '', 'ssl','tls'
* @global string $g_smtp_connection_mode
*/
$g_smtp_connection_mode = '';
/**
* The smtp port to use. The typical SMTP ports are 25 and 587. The port to use
* will depend on the SMTP server configuration and hence others may be used.
* @global int $g_smtp_port
*/
$g_smtp_port = 25;
/**
* @see https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
* Opportunistic TLS
*/
$g_SMTPAutoTLS = false;
// ----------------------------------------------------------------------------
/* [User Authentication] */
/**
* Login authentication method:
* 'MD5' => use password stored on db => will be deprecated and DB used.
* 'DB' => Same as MD5 use password stored on db
* 'LDAP' => use password from LDAP Server
*/
$tlCfg->authentication['domain'] = array('DB' => array('description' => 'DB', 'allowPasswordManagement' => true) ,
'LDAP' => array('description' => 'LDAP', 'allowPasswordManagement' => false) );
/* Default Authentication method */
$tlCfg->authentication['method'] = 'DB';
// Applies only if authentication method is DB.
// Used when:
// 1. user sign up
//
// null => only check password IS NOT EMPTY
//
// $tlCfg->passwordChecks = array('minlen' => 8,'maxlen' => 20,'number' => true,'letter' => true,
// 'capital' => true, 'symbol' => true);
$tlCfg->passwordChecks = null;
// Applies ONLY to the HTML input.
// If auth method is DB, password will be stored as MD5 HASH that requires 32 chars (128 bits)
$tlCfg->loginPagePasswordMaxLenght = 40;
/**
* Standard logout url, used also when SSO is used and hint to skip SSO is used.
* '' => use standard TestLink page
*/
$tlCfg->logoutUrl = '';
// users that will not allow expiration date management on GUI
$tlCfg->noExpDateUsers = array('admin');
/**
* OAUTH auth
* Configure this on custom_config.inc.php
*/
$tlCfg->OAuthServers = array();
// Google
// see cfg/oauth_samples/oauth.google.inc.php
// Github
// see cfg/oauth_samples/oauth.github.inc.php
// Gitlab
// see cfg/oauth_samples/oauth.gitlab.inc.php
// Microsoft
// see cfg/oauth_samples/oauth.microsoft.inc.php
// Azure AD
// see cfg/oauth_samples/oauth.azuread.inc.php
/**
* Single Sign On authentication
*
* SSO_method: CLIENT_CERTIFICATE, tested with Apache Webserver
* SSP_method: WEBSERVER_VAR, tested with Apache and Shibboleth Service Provider.
*/
$tlCfg->authentication['SSO_enabled'] = false;
$tlCfg->authentication['SSO_logout_destination'] = 'YOUR LOGOUT DESTINATION';
// Tested with Apache Webserver
//$tlCfg->authentication['SSO_method'] = 'CLIENT_CERTIFICATE';
//$tlCfg->authentication['SSO_uid_field'] = 'SSL_CLIENT_S_DN_Email';
// Tested with Apache and Shibboleth Service Provider
//$tlCfg->authentication['SSO_method'] = 'WEBSERVER_VAR';
//$tlCfg->authentication['SSO_uid_field'] = 'REMOTE_USER';
//$tlCfg->authentication['SSO_user_target_dbfield'] = 'email';
/**
* LDAP authentication credentials, Multiple LDAP Servers can be used.
* User will be authenticaded against each server (one after other using array index order)
* till authentication succeed or all servers have been used.
*/
$tlCfg->authentication['ldap'] = array();
$tlCfg->authentication['ldap'][1]['ldap_server'] = 'localhost';
$tlCfg->authentication['ldap'][1]['ldap_port'] = '389';
$tlCfg->authentication['ldap'][1]['ldap_version'] = '3'; // could be '2' in some cases
$tlCfg->authentication['ldap'][1]['ldap_root_dn'] = 'dc=mycompany,dc=com';
$tlCfg->authentication['ldap'][1]['ldap_bind_dn'] = ''; // Left empty for anonymous LDAP binding
$tlCfg->authentication['ldap'][1]['ldap_bind_passwd'] = ''; // Left empty for anonymous LDAP binding
$tlCfg->authentication['ldap'][1]['ldap_tls'] = false; // true -> use tls
// Following configuration parameters are used to build
// ldap filter and ldap attributes used by ldap_search()
//
// filter => "(&$t_ldap_organization($t_ldap_uid_field=$t_username))";
// attributess => array( $t_ldap_uid_field, 'dn' );
//
// This can be used to manage situation like explained on post on forum:
// ActiveDirectory + users in AD group
//
$tlCfg->authentication['ldap'][1]['ldap_organization'] = ''; // e.g. '(organizationname=*Traffic)'
$tlCfg->authentication['ldap'][1]['ldap_uid_field'] = 'uid'; // Use 'sAMAccountName' for Active Directory
// Configure following fields in custom_config.inc.php according your configuration
$tlCfg->authentication['ldap'][1]['ldap_email_field'] = 'mail';
$tlCfg->authentication['ldap'][1]['ldap_firstname_field'] = 'givenname';
$tlCfg->authentication['ldap'][1]['ldap_surname_field'] = 'sn';
// Follows Mantisbt idea.
// True if user does not exist on DB, but can be get from LDAP,
// the user will be created AUTOMATICALLY with default user role.
// Create user with following data from LDAP
// mail
// name
// surname
$tlCfg->authentication['ldap_automatic_user_creation'] = false;
/** Enable/disable Users to create accounts on login page */
$tlCfg->user_self_signup = TRUE;
/** What happens when Administrator push the Reset Password Button
'send_password_by_mail'
'display_on_screen'
*/
$tlCfg->password_reset_send_method = 'send_password_by_mail';
/**
* Validating new user login names
* Taken mantisbt version 1.2.5 - www.mantisbt.org and adapted
*
* The regular expression to use when validating new user login names
* The default regular expression allows a-z, A-Z, 0-9, +, -, dot, @ and underscore.
* For testing regular expressions, use http://rubular.com/.
* For regular expression to englihs, use http://xenon.stanford.edu/~xusch/regexp/analyzer.html
*/
$tlCfg->validation_cfg->user_login_valid_regex='/^([a-z\d\-.+_@]+(@[a-z\d\-.]+\.[a-z]{2,4})?)$/i';
/**
* Validating user email addresses
* Example of other possibilities:
* <code>
* $regex = "/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*" .
* "@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i";
* $regex = "/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/";
* </code>
**/
//
// This expression does not allow Top Level Domian (last part of domain name) longer than 4
// If you need to change this
// Configure this on custom_config.inc.php
$tlCfg->validation_cfg->user_email_valid_regex_js = "/^(\w+)([-+.][\w]+)*@(\w[-\w]*\.){1,5}([A-Za-z]){2,4}$/";
$tlCfg->validation_cfg->user_email_valid_regex_php = "/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/U";
// --------------------------------------------------------------------------------------
/* [API] */
/** XML-RPC API availability - do less than promised ;)
FALSE => user are not able to generate and set his/her API key.
XML-RPC server do not check this config in order to answer or not a call.
*/
$tlCfg->api->enabled = TRUE;
// used to display API ID info in the *View pages
$tlCfg->api->id_format = "[ID: %s ]";
// ---------------------------------------------------------------------------------
/* [GUI LAYOUT] */
/** Company logo (used by navigation bar and login page page) */
$tlCfg->logo_login = 'tl-logo-transparent-25.png';
$tlCfg->logo_navbar = 'tl-logo-transparent-12.5.png';
/** Height of the navbar always displayed */
$tlCfg->navbar_height = 70;
/** Login page could show an informational text */
$tlCfg->login_info = ''; // Empty by default
/**
* controls if pagination (via Javascript) will be enabled
*/
$tlCfg->gui->projectView = new stdClass();
$tlCfg->gui->projectView->pagination = new stdClass();
$tlCfg->gui->projectView->pagination->enabled = true;
$tlCfg->gui->projectView->pagination->length = '[20, 40, 60, -1], [20, 40, 60, "All"]';
$tlCfg->gui->usersAssign = new stdClass();
$tlCfg->gui->usersAssign->pagination = new stdClass();
$tlCfg->gui->usersAssign->pagination->enabled = true;
$tlCfg->gui->usersAssign->pagination->length = '[20, 40, 60, -1], [20, 40, 60, "All"]';
$tlCfg->gui->planView = new stdClass();
$tlCfg->gui->planView->pagination = new stdClass();
$tlCfg->gui->planView->pagination->enabled = true;
$tlCfg->gui->planView->pagination->length = '[20, 40, 60, -1], [20, 40, 60, "All"]';
$tlCfg->gui->planView->itemQtyForTopButton = 10;
$tlCfg->gui->buildView = new stdClass();
$tlCfg->gui->buildView->pagination = new stdClass();
$tlCfg->gui->buildView->pagination->enabled = true;
$tlCfg->gui->buildView->pagination->length = '[20, 40, 60, -1], [20, 40, 60, "All"]';
$tlCfg->gui->buildView->itemQtyForTopButton = 10;
$tlCfg->gui->keywordsView = new stdClass();
$tlCfg->gui->keywordsView->pagination = new stdClass();
$tlCfg->gui->keywordsView->pagination->enabled = true;
$tlCfg->gui->keywordsView->pagination->length = '[40, 60, 80, -1], [40, 60, 80, "All"]';
$tlCfg->gui->keywordsView->itemQtyForTopButton = 10;
/**
* controls if operation area (buttons) starts open ('' or 'inline') or closed ('none') on:
* - test suite management
* - test case management
* - req. spec management
* - req. management
*/
$tlCfg->gui->op_area_display = new stdClass();
// test_spec_container => test project, test suite
$tlCfg->gui->op_area_display->test_spec_container = 'none'; // ''
$tlCfg->gui->op_area_display->test_case = 'none'; // 'inline'
$tlCfg->gui->op_area_display->req_spec_container = 'none'; // 'inline'
$tlCfg->gui->op_area_display->req = 'none'; // 'inline'
/**
* @var string Availability of Test Project specific background colour
* 'background' -> standard behaviour for 1.6.x you can have a different
* background colour for every test project.
* 'none' -> new behaviour no background color change
*/
$tlCfg->gui->testproject_coloring = 'none'; // I'm sorry default is not coloring using coloring is a pain
// and useless
/** @TODO havlatm4francisco Ok, then merge these two attributes into one */
/** default background color */
$tlCfg->gui->background_color = '#9BD';
// ENABLED: on features that assign user role to test projects and test plan, colour user name
// according GLOBAL role
// DISABLED: do not color [STANDARD BEHAVIOUR]
$tlCfg->gui->usersAssignGlobalRoleColoring = DISABLED;
// Enable/disable rounded corners via javascript
$tlCfg->gui->round_corners = new stdClass();
$tlCfg->gui->round_corners->exec_history = ENABLED;
$tlCfg->gui->round_corners->tc_title = ENABLED;
$tlCfg->gui->round_corners->tc_spec = ENABLED;
/**
* Display name definition (used to build a human readable display name for users)
* Example of values:
* '%first% %last%' -> John Cook
* '%last%, %first%' -> Cook John
* '%first% %last% %login%' -> John Cook [ux555]
**/
$tlCfg->username_format = '%login%';
/** Configure the frame frmWorkArea navigator width */
$tlCfg->frame_workarea_default_width = "30%";
/** true => icon edit will be added into <a href> as indication an edit features */
$tlCfg->gui->show_icon_edit = false;
/**
* '' => test project name
* 'prefix' => prefix : test project name
*
* ATTENTION : * is used to indicate test project is INACTIVE
* see also $tlCfg->gui->tprojects_combo_order_by
*/
$tlCfg->gui->tprojects_combo_format = 'prefix';
/**
* Order to use when building a testproject combobox (value must be SQL compliant)
* For example:
* 'ORDER BY name'
* 'ORDER_BY nodes_hierarchy.id DESC' -> similar effect to order last created firts
**/
// $tlCfg->gui->tprojects_combo_order_by = 'ORDER BY nodes_hierarchy.id DESC';
$tlCfg->gui->tprojects_combo_order_by = 'ORDER BY TPROJ.prefix ASC';
/** Configure the input size of test case search by id on navigation bar.
* This value will be added to the length of the prefix to dynamically set input size.
* Example: prefix is "projectA-" -> length of prefix is 9
* Now the here defined value (default: 6) will be added to the prefix length
* -> Input field will have an input size of 15
**/
$tlCfg->gui->dynamic_quick_tcase_search_input_size = 6;
// used to round percentages on metricsDashboard.php
$tlCfg->dashboard_precision = 2;
/**
* Choose what kind of webeditor you want to use in every TL area. This configuration
* will be used if no element with search key (area) is found on this structure.
* Every element is a mp with this configuration keys:
*
* 'type':
* 'ckeditor'
* 'tinymce' ==> will be deprecated in future versions
* 'none' -> use plain text area input field
* 'toolbar': only applicable for type = 'fckeditor', 'ckeditor'
* name of ToolbarSet (See: http://docs.fckeditor.net/ for more information about ToolbarSets)
* TestLink stores own definitions in <testlink_dir>/cfg/tl_ckeditor_config.js
*
*
* The next keys/areas are supported:
* 'all' (default setting),
* 'design', 'steps_design', 'testplan', 'build', 'testproject', 'role', 'requirement', 'requirement_spec'.
*
* Examples:
* <code>
* // Copy this to custom_config.inc.php if you want use 'tinymce' as default.
* $tlCfg->gui->text_editor['all'] = array( 'type' => 'tinymce');
* // Copy this to custom_config.inc.php if you want use 'nome' as default.
* $tlCfg->gui->text_editor['all'] = array( 'type' => 'none');
* //This configuration is useful only if default type is set to 'fckeditor'
* $tlCfg->gui->text_editor['design'] = array('toolbar' => 'tl_mini');
*
* $tlCfg->gui->text_editor['testplan'] = array( 'type' => 'none');
* $tlCfg->gui->text_editor['build'] = array( 'type' => 'fckeditor','toolbar' => 'tl_mini');
* $tlCfg->gui->text_editor['testproject'] = array( 'type' => 'tinymce');
* $tlCfg->gui->text_editor['role'] = array( 'type' => 'tinymce');
* $tlCfg->gui->text_editor['requirement'] = array( 'type' => 'none');
* $tlCfg->gui->text_editor['requirement_spec'] = array( 'type' => 'none');
* </code>
*
* Hint: After doing configuration changes, clean you Browser's cookies and cache
*/
/*
$tlCfg->gui->text_editor = array();
$tlCfg->gui->text_editor['all'] = array('type' => 'fckeditor',
'toolbar' => 'tl_default',
'configFile' => 'cfg/tl_ckeditor_config.js',);
$tlCfg->gui->text_editor['execution'] = array( 'type' => 'none');
*/
$tlCfg->gui->text_editor = array();
$tlCfg->gui->text_editor['all'] = ['type' => 'ckeditor',
'toolbar' => 'Testlink',
'configFile' => 'cfg/tl_ckeditor_config.js',
'height' => 150];
// mini toolbar for test case steps edit
$tlCfg->gui->text_editor['steps_design'] = ['type' => 'ckeditor',
'toolbar' => 'TestlinkMini',
'configFile' => 'cfg/tl_ckeditor_config.js',
'height' => 100];
//
$tlCfg->gui->text_editor['preconditions'] = ['type' => 'ckeditor',
'toolbar' => 'Testlink',
'configFile' => 'cfg/tl_ckeditor_config.js',
'height' => 150
];
$tlCfg->gui->text_editor['summary'] = ['type' => 'ckeditor',
'toolbar' => 'Testlink',
'configFile' => 'cfg/tl_ckeditor_config.js',
'height' => 600
];
$tlCfg->gui->text_editor['execution'] = array('type' => 'none');
$tlCfg->gui->text_editor['edit_execution'] = array('type' => 'none', 'cols' => 80, 'rows' => 20);
$tlCfg->gui->text_editor['display_execution_notes'] = array('type' => 'none', 'cols' => 80, 'rows' => 20);
/** User can choose order of menu areas */
$tlCfg->gui->layoutMainPageLeft = array( 'testProject' => 1, 'userAdministration' => 2 ,
'requirements' => 3, 'testSpecification' => 4,
'general' => 5);
$tlCfg->gui->layoutMainPageRight = array( 'testPlan' => 1, 'testExecution' => 2 ,
'testPlanContents' => 3);
/**
* Enable warning on a changed content before an user leave a page.
*
* Tested in:
* - IE8 OK
* - Firefox 3 OK
* - Chrome FAIL
*
* Does not work in Webkit browsers (Chrome, Safari) when using frames.
* Bug in webkit: https://bugs.webkit.org/show_bug.cgi?id=19418
*/
// seems that with config options that will be used on javascript via smarty template variables
// we are having problems using FALSE/TRUE => use 0/1 (or our CONSTANT DISABLED/ENABLED)
$tlCfg->gui->checkNotSaved = ENABLED;
// ----------------------------------------------------------------------------
/* [GUI: TREE] */
/** Default ordering value for new Test Suites and Test Cases to separate them */
$tlCfg->treemenu_default_testsuite_order = 1;
$tlCfg->treemenu_default_testcase_order = 1000;
/** show/hide testcase id on tree menu */
$tlCfg->treemenu_show_testcase_id = TRUE;
/** Reorder test cases based on TC Name or External ID in tree on
* test suite level using reorder button
*/
// 'EXTERNAL_ID' -> Sort on Test Case External ID field displayed on tree.(Default)
// 'NAME' -> Sort on Test Case Name field
$tlCfg->testcase_reorder_by = 'EXTERNAL_ID';
// $tlCfg->testcase_reorder_by = 'NAME';
// ----------------------------------------------------------------------------
/* [GUI: Javascript libraries] */
// May be in future another table sort engine will be better
// kryogenix.org -> Stuart Langridge sortTable
// '' (empty string) -> disable table sorting feature
$g_sort_table_engine='kryogenix.org';
// --------------------------------------------------------------------------------------
/* [Reports] */
$tlCfg->reportsCfg=new stdClass();
//Displayed execution statuses to use on reports (ordered). */
$tlCfg->reportsCfg->exec_status = $tlCfg->results['status_label_for_exec_ui'];
/**
* Default Offset in seconds for reporting start date (reports with date range)
* @uses lib/results/resultsMoreBuilds.php
*/
$tlCfg->reportsCfg->start_date_offset = (7*24*60*60); // one week
// minutes part is ignored but must be configured.
// Hint: set always to :00
$tlCfg->reportsCfg->start_time = '00:00';
// Result matrix (resultsTC.php)
$tlCfg->resultMatrixReport = new stdClass();
// Shows an extra column with the result of the latest execution on
// the lastest CREATED build
$tlCfg->resultMatrixReport->buildColumns['showExecutionResultLatestCreatedBuild'] = true;
// Result matrix (resultsTC.php)
// Shows an extra column with the note of latest execution on
// the lastest CREATED build
$tlCfg->resultMatrixReport->buildColumns['showExecutionNoteLatestCreatedBuild'] = true;
// Show build columns in revers order. The latest build is to the left
$tlCfg->resultMatrixReport->buildColumns['latestBuildOnLeft'] = false;
// After having got performance and usability issue, a limit on max qty of builds
// allowed on data extration has been set.
// Is absolutely arbitrary
//
$tlCfg->resultMatrixReport->buildQtyLimit = 6;
// ORDER BY sql clause, refers to builds table columns
$tlCfg->resultMatrixReport->buildOrderByClause = " ORDER BY name ASC";
// Show all available status details for test plans on metrics dashboard
$tlCfg->metrics_dashboard = new stdClass();
$tlCfg->metrics_dashboard->show_test_plan_status = false;
// ----------------------------------------------------------------------------
/* [GENERATED DOCUMENTATION] */
/**
* Texts and settings for printed documents
* Image is expected in directory <testlink_root>/gui/themes/<your_theme>/images/
* Leave text values empty if you would like to hide parameters.
*/
$tlCfg->document_generator->company_name = 'TestLink Community [configure $tlCfg->document_generator->company_name]';
$tlCfg->document_generator->company_copyright = '2021 © TestLink Community';
$tlCfg->document_generator->confidential_msg = '';
// Logo for generated documents
$tlCfg->document_generator->company_logo = $tlCfg->logo_login;
$tlCfg->document_generator->company_logo_height = '53';
/** CSS used in printed html documents */
$tlCfg->document_generator->css_template = 'css/tl_documents.css';
// CSS file for Requirement Specification Document, Requirement and Requirement Spec Print View
$tlCfg->document_generator->requirement_css_template = 'css/tl_documents.css';
/** Misc settings */
// Display test case version when creating:
// - test spec document
// - test reports
$tlCfg->document_generator->tc_version_enabled = TRUE;
// ----------------------------------------------------------------------------
/* [Test Executions] */
// $tlCfg->exec_cfg->enable_test_automation = DISABLED;
// ENABLED -> enable XML-RPC calls to external test automation server
// new buttons will be displayed on execution pages
// DISABLED -> disable
$tlCfg->exec_cfg->enable_test_automation = DISABLED;
// ASCending -> last execution at bottom
// DESCending -> last execution on top [STANDARD BEHAVIOUR]
$tlCfg->exec_cfg->history_order = 'DESC';
// TRUE -> the whole execution history for the choosen build will be showed
// FALSE -> just last execution for the choosen build will be showed [STANDARD BEHAVIOUR]
$tlCfg->exec_cfg->history_on = FALSE;
// TRUE -> test case VERY LAST (i.e. in any build) execution status will be displayed [STANDARD BEHAVIOUR]
// FALSE -> only last result on current build.
$tlCfg->exec_cfg->show_last_exec_any_build = TRUE;
// TRUE -> History for all builds will be shown
// FALSE -> Only history of the current build will be shown [STANDARD BEHAVIOUR]
$tlCfg->exec_cfg->show_history_all_builds = FALSE;
// TRUE -> History for all platforms (if any exists for test plan) will be shown
// FALSE -> Only history of the current platform will be shown [STANDARD BEHAVIOUR]
$tlCfg->exec_cfg->show_history_all_platforms = FALSE;
// different models for the attachments management on execution page
// $att_model_m1 -> shows upload button and title
// $att_model_m2 -> hides upload button and title
$tlCfg->exec_cfg->att_model = $att_model_m2; //defined in const.inc.php
// IVU
// Default Value