tce_auth.php 4.82 KB
Newer Older
Nicola Asuni's avatar
Nicola Asuni committed
1
2
3
4
<?php
//============================================================+
// File name   : tce_auth.php
// Begin       : 2002-09-02
tecnickcom's avatar
tecnickcom committed
5
// Last Update : 2013-07-05
Nicola Asuni's avatar
Nicola Asuni committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//
// Description : Define access levels for each admin page
//               Note:
//                0 = Anonymous user (uregistered user)
//                1 = registered user
//               10 = System Administrator
//
// Author: Nicola Asuni
//
// (c) Copyright:
//               Nicola Asuni
//               Tecnick.com LTD
//               www.tecnick.com
//               info@tecnick.com
//
// License:
Nicola Asuni's avatar
Nicola Asuni committed
22
//    Copyright (C) 2004-2013 Nicola Asuni - Tecnick.com LTD
Nicola Asuni's avatar
Nicola Asuni committed
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//    See LICENSE.TXT file for more information.
//============================================================+

/**
 * @file
 * Configuration file: define access levels for each admin page.
 * @package com.tecnick.tcexam.admin.cfg
 * @author Nicola Asuni
 * @since 2002-09-02
 */

// ************************************************************
// SECURITY WARNING :
// SET THIS FILE AS READ ONLY AFTER MODIFICATIONS
// ************************************************************

/**
 * Administrator level.
 */
define ('K_AUTH_ADMINISTRATOR', 10);
43
44
45
46
/**
 * backoffice level.
 */
define ('K_AUTH_BACKOFFICE', 8);
Nicola Asuni's avatar
Nicola Asuni committed
47
48
49
50
51
52

/**
 * Operator level.
 */
define ('K_AUTH_OPERATOR', 5);

53
54
55
56
57
/**
 * Lector level. Currently deprecated
 */
//define ('K_AUTH_LECTOR', 4);

Nicola Asuni's avatar
Nicola Asuni committed
58
59
60
61
62
63
64
65
/**
 * Required user's level to access index page.
 */
define ('K_AUTH_INDEX', K_AUTH_OPERATOR);

/**
 * Required user's level to access "user editor".
 */
66
define ('K_AUTH_ADMIN_USERS', K_AUTH_OPERATOR);
Nicola Asuni's avatar
Nicola Asuni committed
67
68
69
70
71
72
73
74
75

/**
 * Required user's level to delete users.
 */
define ('K_AUTH_DELETE_USERS', K_AUTH_ADMINISTRATOR);

/**
 * Required user's level to export users.
 */
76
define ('K_AUTH_EXPORT_USERS', K_AUTH_OPERATOR);
Nicola Asuni's avatar
Nicola Asuni committed
77
78
79
80

/**
 * Required user's level to import users.
 */
81
define ('K_AUTH_IMPORT_USERS', K_AUTH_OPERATOR);
Nicola Asuni's avatar
Nicola Asuni committed
82
83
84
85

/**
 * Required user's level to access "group editor".
 */
86
define ('K_AUTH_ADMIN_GROUPS', K_AUTH_OPERATOR);
Nicola Asuni's avatar
Nicola Asuni committed
87
88
89
90
91
92
93
94
95

/**
 * Required user's level to delete user groups.
 */
define ('K_AUTH_DELETE_GROUPS', K_AUTH_ADMINISTRATOR);

/**
 * Required user's level to move users from one group to another.
 */
96
define ('K_AUTH_MOVE_GROUPS', K_AUTH_OPERATOR);
Nicola Asuni's avatar
Nicola Asuni committed
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

/**
 * Required user's level to access "tcecode editor".
 */
define ('K_AUTH_ADMIN_TCECODE', K_AUTH_OPERATOR);

/**
 * Required user's level to access "module editor".
 */
define ('K_AUTH_ADMIN_MODULES', K_AUTH_OPERATOR);

/**
 * Required user's level to access "subject editor".
 */
define ('K_AUTH_ADMIN_SUBJECTS', K_AUTH_OPERATOR);

/**
 * Required user's level to access "question editor".
 */
define ('K_AUTH_ADMIN_QUESTIONS', K_AUTH_OPERATOR);

/**
 * Required user's level to access "answer editor".
 */
define ('K_AUTH_ADMIN_ANSWERS', K_AUTH_OPERATOR);

/**
 * Required user's level to access "test editor".
 */
define ('K_AUTH_ADMIN_TESTS', K_AUTH_OPERATOR);

/**
 * Required user's level to access "TCExam information".
 */
define ('K_AUTH_ADMIN_INFO', 0);

/**
 * Required user's level to display online users.
 */
define ('K_AUTH_ADMIN_ONLINE_USERS', K_AUTH_OPERATOR);

/**
 * Required user's level to upload images.
 */
define ('K_AUTH_ADMIN_UPLOAD_IMAGES', K_AUTH_OPERATOR);

/**
 * Required user's level to manually rate free text answers.
 */
define ('K_AUTH_ADMIN_RATING', K_AUTH_OPERATOR);

/**
 * Required user's level to display results.
 */
define ('K_AUTH_ADMIN_RESULTS', K_AUTH_OPERATOR);

/**
 * Required user's level to import questions.
 */
156
define ('K_AUTH_ADMIN_IMPORT', K_AUTH_OPERATOR);
Nicola Asuni's avatar
Nicola Asuni committed
157
158
159
160

/**
 * Required user's level to import OMR answers.
 */
Daniel Haag's avatar
Daniel Haag committed
161
define ('K_AUTH_ADMIN_OMR_IMPORT', K_AUTH_ADMINISTRATOR);
Nicola Asuni's avatar
Nicola Asuni committed
162
163

/**
164
 * Required user's level to backup and restore the database
Nicola Asuni's avatar
Nicola Asuni committed
165
 */
166
define ('K_AUTH_BACKUP', K_AUTH_ADMINISTRATOR);
Nicola Asuni's avatar
Nicola Asuni committed
167
168
169
170

/**
 * Required user's level to access file manager for multimedia files.
 */
Nicola Asuni's avatar
Nicola Asuni committed
171
define ('K_AUTH_ADMIN_FILEMANAGER', K_AUTH_OPERATOR);
Nicola Asuni's avatar
Nicola Asuni committed
172
173
174
175

/**
 * Required user's level to create and delete directories.
 */
176
define ('K_AUTH_ADMIN_DIRS', K_AUTH_ADMINISTRATOR);
Nicola Asuni's avatar
Nicola Asuni committed
177
178
179
180

/**
 * Required user's level to delete multimedia files.
 */
181
define ('K_AUTH_DELETE_MEDIAFILE', K_AUTH_OPERATOR);
Nicola Asuni's avatar
Nicola Asuni committed
182
183
184
185

/**
 * Required user's level to rename multimedia files.
 */
186
define ('K_AUTH_RENAME_MEDIAFILE', K_AUTH_OPERATOR);
Nicola Asuni's avatar
Nicola Asuni committed
187

tecnickcom's avatar
tecnickcom committed
188
189
190
/**
 * Required user's level to edit SSL certificates.
 */
191
define ('K_AUTH_ADMIN_SSLCERT', K_AUTH_ADMINISTRATOR);
tecnickcom's avatar
tecnickcom committed
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206

/**
 * Minimum page level for which a valid client SSL certificate is required.
 * Use false or a level above 10 to disable the control.
 * Use 0 to enable for all area.
 * Use 10 to enable just for the ADMIN pages.
 */
define ('K_AUTH_SSL_LEVEL', false);

/**
 * Comma separated lit of SSL certificates IDs required to
 * access pages with K_AUTH_SSL_LEVEL level or more.
 */
define ('K_AUTH_SSLIDS', '');

207

Nicola Asuni's avatar
Nicola Asuni committed
208
209
210
//============================================================+
// END OF FILE
//============================================================+