auto/share/dist/App-Dochazka-REST/REST_Config.pm

filter: Statementstmt 100% 40 / 40 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 42 / 42 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« auto/share/dist/App-Dochazka-REST/Component_Config.pm ↑ Summary auto/share/dist/App-Dochazka-REST/REST_MetaConfig.pm »
1 # *************************************************************************
2 # Copyright (c) 2014-2017, SUSE LLC
3 #
4 # All rights reserved.
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are met:
8 #
9 # 1. Redistributions of source code must retain the above copyright notice,
10 # this list of conditions and the following disclaimer.
11 #
12 # 2. Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in the
14 # documentation and/or other materials provided with the distribution.
15  
16 # 3. Neither the name of SUSE LLC nor the names of its contributors may be
17 # used to endorse or promote products derived from this software without
18 # specific prior written permission.
19 #
20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 # POSSIBILITY OF SUCH DAMAGE.
31 # *************************************************************************
32  
33 # REST_Config.pm - Top-level configuration file providing default values for
34 # various site configuration parameters. Any or all of these parameters can be
35 # overrided in your site configuration file(s).
36 #
37 # WARNING: THIS FILE MAY CONTAIN PASSWORDS (restrictive permissions may be
38 # warranted)
39  
40  
41 # DOCHAZKA_REST_LOG_FILE
42 # full path of log file to log to
43 41 set( 'DOCHAZKA_REST_LOG_FILE', '/var/log/dochazka-rest.log' );
44  
45 # DOCHAZKA_REST_LOG_FILE_RESET
46 # should the logfile be deleted/wiped/unlinked/reset before each use
47 41 set( 'DOCHAZKA_REST_LOG_FILE_RESET', 0 );
48  
49 # DOCHAZKA_STATE_DIR
50 # full path of Dochazka server state directory
51 # (should be created by packaging)
52 41 set( 'DOCHAZKA_STATE_DIR', '/var/lib/dochazka-rest' );
53  
54 # DOCHAZKA_REPORT_BUGS_TO
55 # this should be an ordinary string like "bugs@dochazka.com" or
56 # "http://bugs.dochazka.com"
57 41 set( 'DOCHAZKA_REPORT_BUGS_TO', 'bug-App-Dochazka-REST@rt.cpan.org' );
58  
59 # DOCHAZKA_DBNAME
60 # name of PostgreSQL database to use
61 41 set( 'DOCHAZKA_DBNAME', 'dochazka-test' );
62  
63 # DOCHAZKA_DBUSER
64 # name of PostgreSQL username (role) to connect with
65 41 set( 'DOCHAZKA_DBUSER', 'dochazka' );
66  
67 # DOCHAZKA_DBPASS
68 # name of PostgreSQL username (role) to connect with
69 41 set( 'DOCHAZKA_DBPASS', 'dochazka' );
70  
71 # DOCHAZKA_DBHOST
72 # host and domain name of remote PostgreSQL server - set to an empty
73 # string to use the default: local domain socket
74 41 set( 'DOCHAZKA_DBHOST', '' );
75  
76 # DOCHAZKA_DBPORT
77 # port where the remote PostgreSQL server is listening - set to an empty
78 # string to use the default: local domain socket
79 41 set( 'DOCHAZKA_DBPORT', '' );
80  
81 # DOCHAZKA_DBSSLMODE
82 # setting for the 'sslmode' property sent to DBD::Pg when the database
83 # connection is established - see 'perldoc DBD::Pg' - set to the empty
84 # string to use the default: (none)
85 #set( 'DOCHAZKA_DBSSLMODE', 'require' );
86 41 set( 'DOCHAZKA_DBSSLMODE', '' );
87  
88 # DOCHAZKA_TIMEZONE
89 # used to set the PGTZ environment variable
90 41 set( 'DOCHAZKA_TIMEZONE', 'Europe/Prague' );
91  
92 # DOCHAZKA_AUDITING
93 # enable/disable auditing - note that if this is disabled at the beginning
94 # when the database is initialized, there is no easy way to enable it later
95 41 set( 'DOCHAZKA_AUDITING', 1 );
96  
97 # DOCHAZKA_AUDIT_TABLES
98 # list of tables to audit (to disable auditing, set this parameter to [] in
99 # your SiteConfig.pm and call 'delete_audit_triggers')
100 41 set( 'DOCHAZKA_AUDIT_TABLES', [
101 qw( activities employees intervals locks privhistory schedhistory schedules )
102 ] );
103  
104 # DOCHAZKA_SYSTEM_USERS
105 # system users - not eligible for LDAP sync
106 41 set( 'DOCHAZKA_SYSTEM_USERS', [ 'root', 'demo' ] );
107  
108 # DOCHAZKA_EID_OF_ROOT
109 # Employee ID of the root employee -- set at initialization time (in
110 # REST.pm) -- do not set here
111 #!! DO NOT SET HERE !!
112  
113 # DOCHAZKA_EID_OF_DEMO
114 # Employee ID of the demo employee -- set at initialization time (in
115 # REST.pm) -- do not set here
116 #!! DO NOT SET HERE !!
117  
118 # DOCHAZKA_ACTIVITY_DEFINITIONS
119 # Initial set of activity definitions - sample only - override this
120 # with _your_ site's activities in Dochazka_SiteConfig.pm
121 41 set( 'DOCHAZKA_ACTIVITY_DEFINITIONS', [
122 { code => 'WORK', long_desc => 'Work' },
123 { code => 'OVERTIME_WORK', long_desc => 'Overtime work' },
124 { code => 'PAID_VACATION', long_desc => 'Paid vacation' },
125 { code => 'UNPAID_LEAVE', long_desc => 'Unpaid leave' },
126 { code => 'DOCTOR_APPOINTMENT', long_desc => 'Doctor appointment' },
127 { code => 'CTO', long_desc => 'Compensation Time Off' },
128 { code => 'SICK_DAY', long_desc => 'Discretionary sick leave' },
129 { code => 'MEDICAL_LEAVE', long_desc => 'Statutory medical leave' },
130 ] );
131  
132 # DOCHAZKA_BASIC_AUTH_REALM
133 # message displayed to user when she is asked to enter her credentials
134 41 set( 'DOCHAZKA_BASIC_AUTH_REALM',
135 'ENTER YOUR DOCHAZKA CREDENTIALS (e.g., demo/demo)' );
136  
137 # DOCHAZKA_LDAP
138 # Enable/disable LDAP authentication
139 41 set( 'DOCHAZKA_LDAP', 0 );
140  
141 # DOCHAZKA_LDAP_AUTOCREATE
142 # Autocreate unknown users if found in LDAP
143 41 set( 'DOCHAZKA_LDAP_AUTOCREATE', 0 );
144  
145 # DOCHAZKA_LDAP_AUTOCREATE_AS
146 # Priv level to assign to LDAP-autocreated users
147 41 set( 'DOCHAZKA_LDAP_AUTOCREATE_AS', 'passerby' );
148  
149 # DOCHAZKA_LDAP_SERVER
150 # LDAP server for LDAP authentication
151 # make sure to include either 'ldap://' or 'ldaps://'
152 41 set( 'DOCHAZKA_LDAP_SERVER', 'ldaps://ldap.dochazka.site' );
153  
154 # DOCHAZKA_LDAP_BASE
155 # base DN
156 41 set( 'DOCHAZKA_LDAP_BASE', 'dc=dochazka,dc=site' );
157  
158 # DOCHAZKA_LDAP_MAPPING
159 # in order for LDAP authentication to work, the employee fields that
160 # Dochazka uses, such as 'nick', 'fullname', 'email', etc. must be mapped
161 # to corresponding fields in the LDAP database (e.g. 'uid', 'cn', etc.) -
162 # that is accomplished via this parameter
163 # WARNING: change the values only, never the keys! The only exception is
164 # that you can optionally add a 'sec_id' key if appropriate for your LDAP
165 # database.
166 41 set( 'DOCHAZKA_LDAP_MAPPING', {
167 'nick' => 'uid',
168 'fullname' => 'cn',
169 'email' => 'mail',
170 });
171  
172 # DOCHAZKA_LDAP_FILTER
173 # filter
174 41 set( 'DOCHAZKA_LDAP_FILTER', '(EMPLOYEESTATUS=Active)' );
175  
176 # DOCHAZKA_LDAP_TEST_UID_EXISTENT
177 # an existent UID for LDAP testing (t/201-LDAP.t)
178 41 set( 'DOCHAZKA_LDAP_TEST_UID_EXISTENT', 'I_exist_in_local_LDAP' );
179  
180 # DOCHAZKA_LDAP_TEST_UID_NON_EXISTENT
181 # a non-existent UID for LDAP testing (t/201-LDAP.t)
182 41 set( 'DOCHAZKA_LDAP_TEST_UID_NON_EXISTENT', 'I_do_NOT_exist_in_local_LDAP' );
183  
184 # DOCHAZKA_REST_SESSION_EXPIRATION_TIME
185 # number of seconds after which a session will be considered stale
186 41 set( 'DOCHAZKA_REST_SESSION_EXPIRATION_TIME', 3600 );
187  
188 # DOCHAZKA_PROFILE_EDITABLE_FIELDS
189 # which employee fields can be updated by employees with privlevel 'inactive' and 'active'
190 # N.B. 1 administrators can edit all fields, and passerbies can't edit any
191 # N.B. 2 if LDAP authentication and LDAP import/sync are being used, it may not
192 # make sense for employees to edit *any* of the fields
193 # N.B. 3 this site param affects the functioning of the "POST employee/self" and "POST employee/current" resources
194 41 set( 'DOCHAZKA_PROFILE_EDITABLE_FIELDS', {
195 'inactive' => [ 'password' ],
196 'active' => [ 'password' ],
197 });
198  
199 # DOCHAZKA_INTERVAL_SELECT_LIMIT
200 # upper limit on number of intervals fetched (for sanity, to avoid
201 # overly huge result sets)
202 41 set( 'DOCHAZKA_INTERVAL_SELECT_LIMIT', undef );
203  
204 # DOCHAZKA_INTERVAL_DELETE_LIMIT
205 # highest possible number of intervals that can be deleted at one time
206 41 set( 'DOCHAZKA_INTERVAL_DELETE_LIMIT', 250 );
207  
208 # DOCHAZKA_EMPLOYEE_MINIMAL_FIELDS
209 # list of fields to include in "GET employee/eid/:eid/minimal" and
210 # "GET employee/nick/:nick/minimal" and "GET employee/sec_id/:sec_id/minimal"
211 41 set( 'DOCHAZKA_EMPLOYEE_MINIMAL_FIELDS', [
212 qw( sec_id nick fullname email eid supervisor )
213 ] );
214  
215 # DOCHAZKA_INTERVAL_FILLUP_LIMIT
216 # upper limit (in days) on the fillup tsrange
217 41 set( 'DOCHAZKA_INTERVAL_FILLUP_LIMIT', 365 );
218  
219 # DOCHAZKA_INTERVAL_FILLUP_MAX_DATELIST_ENTRIES
220 # upper limit for number of date_list entries
221 41 set( 'DOCHAZKA_INTERVAL_FILLUP_MAX_DATELIST_ENTRIES', 35 );
222  
223 # DOCHAZKA_SQL_TRACE
224 # include extra debugging info in SQL error messages
225 41 set( 'DOCHAZKA_SQL_TRACE', 0 );
226  
227 # -----------------------------------
228 # DO NOT EDIT ANYTHING BELOW THIS LINE
229 # -----------------------------------
230 41 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
231 41 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
232  
233 41 1;
« auto/share/dist/App-Dochazka-REST/Component_Config.pm ↑ Summary auto/share/dist/App-Dochazka-REST/REST_MetaConfig.pm »