Initial revision
[Packages/TYPO3.CMS.git] / t3lib / stddb / tbl_be.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2003 Kasper Skårhøj (kasper@typo3.com)
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
18 *
19 *
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27 /**
28 * Contains the dynamic configuation of the fields in the core tables of TYPO3: be_users, be_groups and sys_filemounts
29 *
30 * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
31 *
32 * @author Kasper Skårhøj <kasper@typo3.com>
33 * @see tables.php, tables.sql
34 */
35
36
37
38
39
40
41 /**
42 * Backend users - Those who login into the TYPO3 administration backend
43 */
44 $TCA['be_users'] = Array (
45 'ctrl' => $TCA['be_users']['ctrl'],
46 'interface' => Array (
47 'showRecordFieldList' => 'username,usergroup,db_mountpoints,file_mountpoints,admin,options,fileoper_perms,userMods,lockToDomain,realName,email,disable,starttime,endtime'
48 ),
49 'columns' => Array (
50 'username' => Array (
51 'label' => 'Username:',
52 'config' => Array (
53 'type' => 'input',
54 'size' => '20',
55 'max' => '20',
56 'eval' => 'nospace,lower,unique,required'
57 )
58 ),
59 'password' => Array (
60 'label' => 'Password:',
61 'config' => Array (
62 'type' => 'input',
63 'size' => '20',
64 'max' => '40',
65 'eval' => 'required,md5,password'
66 )
67 ),
68 'usergroup' => Array (
69 'label' => 'Group:',
70 'config' => Array (
71 'type' => 'select',
72 'foreign_table' => 'be_groups',
73 'foreign_table_where' => 'ORDER BY be_groups.title',
74 'size' => '5',
75 'maxitems' => '20',
76 'wizards' => Array(
77 '_PADDING' => 1,
78 '_VERTICAL' => 1,
79 'edit' => Array(
80 'type' => 'popup',
81 'title' => 'Edit usergroup',
82 'script' => 'wizard_edit.php',
83 'popup_onlyOpenIfSelected' => 1,
84 'icon' => 'edit2.gif',
85 'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
86 ),
87 'add' => Array(
88 'type' => 'script',
89 'title' => 'Create new group',
90 'icon' => 'add.gif',
91 'params' => Array(
92 'table'=>'be_groups',
93 'pid' => '0',
94 'setValue' => 'prepend'
95 ),
96 'script' => 'wizard_add.php',
97 ),
98 'list' => Array(
99 'type' => 'script',
100 'title' => 'List groups',
101 'icon' => 'list.gif',
102 'params' => Array(
103 'table'=>'be_groups',
104 'pid' => '0',
105 ),
106 'script' => 'wizard_list.php',
107 )
108 )
109 )
110 ),
111 'lockToDomain' => Array (
112 'label' => 'Lock to domain:',
113 'config' => Array (
114 'type' => 'input',
115 'size' => '20',
116 'eval' => 'trim',
117 'max' => '50',
118 'checkbox' => ''
119 )
120 ),
121 'db_mountpoints' => Array (
122 'label' => 'DB Mounts:',
123 'config' => Array (
124 'type' => 'group',
125 'internal_type' => 'db',
126 'allowed' => 'pages',
127 'size' => '3',
128 'maxitems' => '10',
129 'autoSizeMax' => 10,
130 'show_thumbs' => '1'
131 )
132 ),
133 'file_mountpoints' => Array (
134 'label' => 'File Mounts:',
135 'config' => Array (
136 'type' => 'group',
137 'internal_type' => 'db',
138 'allowed' => 'sys_filemounts',
139 'size' => '3',
140 'maxitems' => '10',
141 'autoSizeMax' => 10,
142 'show_thumbs' => '1',
143 'wizards' => Array(
144 '_PADDING' => 1,
145 '_VERTICAL' => 1,
146 'edit' => Array(
147 'type' => 'popup',
148 'title' => 'Edit filemount',
149 'script' => 'wizard_edit.php',
150 'icon' => 'edit2.gif',
151 'popup_onlyOpenIfSelected' => 1,
152 'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
153 ),
154 'add' => Array(
155 'type' => 'script',
156 'title' => 'Create new filemount',
157 'icon' => 'add.gif',
158 'params' => Array(
159 'table'=>'sys_filemounts',
160 'pid' => '0',
161 'setValue' => 'prepend'
162 ),
163 'script' => 'wizard_add.php',
164 ),
165 'list' => Array(
166 'type' => 'script',
167 'title' => 'List filemounts',
168 'icon' => 'list.gif',
169 'params' => Array(
170 'table'=>'sys_filemounts',
171 'pid' => '0',
172 ),
173 'script' => 'wizard_list.php',
174 )
175 )
176 )
177 ),
178 'email' => Array (
179 'label' => 'Email:',
180 'config' => Array (
181 'type' => 'input',
182 'size' => '20',
183 'eval' => 'trim',
184 'max' => '80'
185 )
186 ),
187 'realName' => Array (
188 'label' => 'Name:',
189 'config' => Array (
190 'type' => 'input',
191 'size' => '20',
192 'eval' => 'trim',
193 'max' => '80'
194 )
195 ),
196 'disable' => Array (
197 'label' => 'Disable:',
198 'config' => Array (
199 'type' => 'check'
200 )
201 ),
202 'admin' => Array (
203 'label' => 'Admin(!):',
204 'config' => Array (
205 'type' => 'check',
206 'default' => '0'
207 )
208 ),
209 'options' => Array (
210 'label' => 'Mount from groups:',
211 'config' => Array (
212 'type' => 'check',
213 'items' => Array (
214 Array('DB Mounts', 0),
215 Array('File Mounts', 0)
216 ),
217 'default' => '3'
218 )
219 ),
220 'fileoper_perms' => Array (
221 'label' => 'Fileoperation permissions:',
222 'config' => Array (
223 'type' => 'check',
224 'items' => Array (
225 Array('Files: Upload,Copy,Move,Delete,Rename,New,Edit', 0),
226 Array('Files: Unzip', 0),
227 Array('Directory: Move,Delete,Rename,New', 0),
228 Array('Directory: Copy', 0),
229 Array('Directory: Delete recursively (rm -Rf)', 0)
230 ),
231 'default' => '7'
232 )
233 ),
234 'starttime' => Array (
235 'label' => 'Start:',
236 'config' => Array (
237 'type' => 'input',
238 'size' => '8',
239 'max' => '20',
240 'eval' => 'date',
241 'default' => '0',
242 'checkbox' => '0'
243 )
244 ),
245 'endtime' => Array (
246 'label' => 'Stop:',
247 'config' => Array (
248 'type' => 'input',
249 'size' => '8',
250 'max' => '20',
251 'eval' => 'date',
252 'checkbox' => '0',
253 'default' => '0',
254 'range' => Array (
255 'upper' => mktime(0,0,0,12,31,2020),
256 'lower' => mktime(0,0,0,date('m')-1,date('d'),date('Y'))
257 )
258 )
259 ),
260 'lang' => Array (
261 'label' => 'Default Language:',
262 'config' => Array (
263 'type' => 'select',
264 'items' => Array (
265 Array('English', ''),
266 Array('Danish', 'dk'),
267 Array('German', 'de'),
268 Array('Norwegian', 'no'),
269 Array('Italian', 'it'),
270 Array('French', 'fr'),
271 Array('Spanish', 'es'),
272 Array('Dutch', 'nl'),
273 Array('Czech', 'cz'),
274 Array('Polish', 'pl'),
275 Array('Slovenian', 'si'),
276 Array('Finnish', 'fi'),
277 Array('Turkish', 'tr'),
278 Array('Swedish', 'se'),
279 Array('Portuguese', 'pt'),
280 Array('Russian', 'ru'),
281 Array('Romanian', 'ro'),
282 Array('Chinese (Simpl)', 'ch'),
283 Array('Slovak', 'sk'),
284 Array('Lithuanian', 'lt'),
285 Array('Icelandic', 'is'),
286 Array('Croatian', 'hr'),
287 Array('Hungarian', 'hu'),
288 Array('Greenlandic', 'gl'),
289 Array('Thai', 'th'),
290 Array('Greek', 'gr'),
291 Array('Chinese (Trad)', 'hk'),
292 Array('Basque', 'eu'),
293 Array('Bulgarian', 'bg'),
294 Array('Brazilian Portuguese', 'br'),
295 Array('Estonian', 'et'),
296 )
297 )
298 ),
299 'userMods' => Array (
300 'label' => 'Modules:',
301 'config' => Array (
302 'type' => 'select',
303 'special' => 'modListUser',
304 'size' => '5',
305 'autoSizeMax' => 50,
306 'maxitems' => '15'
307 )
308 ),
309 'TSconfig' => Array (
310 'label' => 'TSconfig:',
311 'config' => Array (
312 'type' => 'text',
313 'cols' => '40',
314 'rows' => '5',
315 'wizards' => Array(
316 '_PADDING' => 4,
317 '0' => Array(
318 'type' => t3lib_extMgm::isLoaded('tsconfig_help')?'popup':'',
319 'title' => 'TSconfig QuickReference',
320 'script' => 'wizard_tsconfig.php?mode=beuser',
321 'icon' => 'wizard_tsconfig.gif',
322 'JSopenParams' => 'height=500,width=780,status=0,menubar=0,scrollbars=1',
323 )
324 )
325 )
326 ),
327 'createdByAction' => Array('config'=>array('type'=>'passthrough'))
328 ),
329 'types' => Array (
330 '0' => Array('showitem' => 'username;;;;2-2-2, password, usergroup, lockToDomain, admin;;;;5-5-5, realName;;;;3-3-3, email, lang, userMods;;;;4-4-4, options, db_mountpoints, file_mountpoints, fileoper_perms, --div--, TSconfig;;;;5-5-5'),
331 '1' => Array('showitem' => 'username;;;;2-2-2, password, usergroup, admin;;;;5-5-5, realName;;;;3-3-3, email, lang, options;;;;4-4-4, db_mountpoints, file_mountpoints, fileoper_perms, --div--, TSconfig;;;;5-5-5')
332 ),
333 'palettes' => Array (
334 '1' => Array('showitem' => 'disable, starttime, endtime')
335 )
336 );
337
338
339
340 /**
341 * Backend usergroups - Much permission criterias are based on membership of backend groups.
342 */
343 $TCA['be_groups'] = Array (
344 'ctrl' => $TCA['be_groups']['ctrl'],
345 'interface' => Array (
346 'showRecordFieldList' => 'title,db_mountpoints,file_mountpoints,inc_access_lists,tables_select,tables_modify,pagetypes_select,non_exclude_fields,groupMods,lockToDomain,description'
347 ),
348 'columns' => Array (
349 'title' => Array (
350 'label' => 'Grouptitle:',
351 'config' => Array (
352 'type' => 'input',
353 'size' => '25',
354 'max' => '20',
355 'eval' => 'trim,required'
356 )
357 ),
358 'db_mountpoints' => Array (
359 'label' => 'DB Mounts:',
360 'config' => Array (
361 'type' => 'group',
362 'internal_type' => 'db',
363 'allowed' => 'pages',
364 'size' => '3',
365 'maxitems' => '10',
366 'autoSizeMax' => 10,
367 'show_thumbs' => '1'
368 )
369 ),
370 'file_mountpoints' => Array (
371 'label' => 'File Mounts:',
372 'config' => Array (
373 'type' => 'group',
374 'internal_type' => 'db',
375 'allowed' => 'sys_filemounts',
376 'size' => '3',
377 'maxitems' => '10',
378 'autoSizeMax' => 10,
379 'show_thumbs' => '1',
380 'wizards' => Array(
381 '_PADDING' => 1,
382 '_VERTICAL' => 1,
383 'edit' => Array(
384 'type' => 'popup',
385 'title' => 'Edit filemount',
386 'script' => 'wizard_edit.php',
387 'popup_onlyOpenIfSelected' => 1,
388 'icon' => 'edit2.gif',
389 'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
390 ),
391 'add' => Array(
392 'type' => 'script',
393 'title' => 'Create new filemount',
394 'icon' => 'add.gif',
395 'params' => Array(
396 'table'=>'sys_filemounts',
397 'pid' => '0',
398 'setValue' => 'prepend'
399 ),
400 'script' => 'wizard_add.php',
401 ),
402 'list' => Array(
403 'type' => 'script',
404 'title' => 'List filemounts',
405 'icon' => 'list.gif',
406 'params' => Array(
407 'table'=>'sys_filemounts',
408 'pid' => '0',
409 ),
410 'script' => 'wizard_list.php',
411 )
412 )
413 )
414 ),
415 'pagetypes_select' => Array (
416 'label' => 'Page types:',
417 'config' => Array (
418 'type' => 'select',
419 'special' => 'pagetypes',
420 'size' => '5',
421 'autoSizeMax' => 50,
422 'maxitems' => '20'
423 )
424 ),
425 'tables_modify' => Array (
426 'label' => 'Tables (modify):',
427 'config' => Array (
428 'type' => 'select',
429 'special' => 'tables',
430 'size' => '5',
431 'autoSizeMax' => 50,
432 'maxitems' => '20'
433 )
434 ),
435 'tables_select' => Array (
436 'label' => 'Tables (listing):',
437 'config' => Array (
438 'type' => 'select',
439 'special' => 'tables',
440 'size' => '5',
441 'autoSizeMax' => 50,
442 'maxitems' => '20'
443 )
444 ),
445 'non_exclude_fields' => Array (
446 'label' => 'Allowed excludefields:',
447 'config' => Array (
448 'type' => 'select',
449 'special' => 'exclude',
450 'size' => '25',
451 'maxitems' => '300',
452 'autoSizeMax' => 50,
453 )
454 ),
455 'hidden' => Array (
456 'label' => 'Disable:',
457 'config' => Array (
458 'type' => 'check',
459 'default' => '0'
460 )
461 ),
462 'lockToDomain' => Array (
463 'label' => 'Lock to domain:',
464 'config' => Array (
465 'type' => 'input',
466 'size' => '20',
467 'eval' => 'trim',
468 'max' => '50',
469 'checkbox' => ''
470 )
471 ),
472 'groupMods' => Array (
473 'label' => 'Modules:',
474 'config' => Array (
475 'type' => 'select',
476 'special' => 'modListGroup',
477 'size' => '5',
478 'autoSizeMax' => 50,
479 'maxitems' => '15'
480 )
481 ),
482 'inc_access_lists' => Array (
483 'label' => 'Include Access Lists:',
484 'config' => Array (
485 'type' => 'check',
486 'default' => '0'
487 )
488 ),
489 'description' => Array (
490 'label' => 'Description:',
491 'config' => Array (
492 'type' => 'text',
493 'rows' => 5,
494 'cols' => 30
495 )
496 ),
497 'TSconfig' => Array (
498 'label' => 'TSconfig:',
499 'config' => Array (
500 'type' => 'text',
501 'cols' => '40',
502 'rows' => '5',
503 'wizards' => Array(
504 '_PADDING' => 4,
505 '0' => Array(
506 'type' => t3lib_extMgm::isLoaded('tsconfig_help')?'popup':'',
507 'title' => 'TSconfig QuickReference',
508 'script' => 'wizard_tsconfig.php?mode=beuser',
509 'icon' => 'wizard_tsconfig.gif',
510 'JSopenParams' => 'height=500,width=780,status=0,menubar=0,scrollbars=1',
511 )
512 )
513 )
514 ),
515 'hide_in_lists' => Array (
516 'label' => 'Hide in lists:',
517 'config' => Array (
518 'type' => 'check',
519 'default' => 0
520 )
521 ),
522 'subgroup' => Array (
523 'label' => 'Sub Groups:',
524 'config' => Array (
525 'type' => 'select',
526 'foreign_table' => 'be_groups',
527 'foreign_table_where' => 'ORDER BY be_groups.title',
528 'size' => '5',
529 'autoSizeMax' => 50,
530 'maxitems' => '20'
531 )
532 )
533 ),
534 'types' => Array (
535 '0' => Array('showitem' => 'hidden;;;;1-1-1,title;;;;2-2-2, lockToDomain, --div--, inc_access_lists;;;;3-3-3, db_mountpoints;;;;4-4-4,file_mountpoints,hide_in_lists,subgroup,description, --div--, TSconfig;;;;5-5-5'),
536 '1' => Array('showitem' => 'hidden;;;;1-1-1,title;;;;2-2-2, lockToDomain, --div--, inc_access_lists;;;;3-3-3, groupMods, tables_select, tables_modify, pagetypes_select, non_exclude_fields, --div--, db_mountpoints;;;;4-4-4,file_mountpoints,hide_in_lists,subgroup,description, --div--, TSconfig;;;;5-5-5')
537 )
538 );
539
540
541
542 /**
543 * System filemounts - Defines filepaths on the server which can be mounted for users so they can upload and manage files online by eg. the Filelist module
544 */
545 $TCA['sys_filemounts'] = Array (
546 'ctrl' => $TCA['sys_filemounts']['ctrl'],
547 'interface' => Array (
548 'showRecordFieldList' => 'title,hidden,path,base'
549 ),
550 'columns' => Array (
551 'title' => Array (
552 'label' => 'LABEL:',
553 'config' => Array (
554 'type' => 'input',
555 'size' => '20',
556 'max' => '30',
557 'eval' => 'required,trim'
558 )
559 ),
560 'path' => Array (
561 'label' => 'PATH:',
562 'config' => Array (
563 'type' => 'input',
564 'size' => '40',
565 'max' => '120',
566 'eval' => 'required,trim'
567 )
568 ),
569 'hidden' => Array (
570 'label' => 'Disable:',
571 'config' => Array (
572 'type' => 'check'
573 )
574 ),
575 'base' => Array (
576 'label' => 'BASE',
577 'config' => Array (
578 'type' => 'radio',
579 'items' => Array (
580 Array('absolute (root) / ', 0),
581 Array('relative ../fileadmin/', 1)
582 ),
583 'default' => 0
584 )
585 )
586 ),
587 'types' => Array (
588 '0' => Array('showitem' => 'hidden;;;;1-1-1,title;;;;3-3-3,path,base')
589 )
590 );
591 ?>