Adding first version of be_acl
authorsebastian <sebastian@735d13b6-9817-0410-8766-e36946ffe9aa>
Sun, 7 Jun 2009 08:44:44 +0000 (08:44 +0000)
committersebastian <sebastian@735d13b6-9817-0410-8766-e36946ffe9aa>
Sun, 7 Jun 2009 08:44:44 +0000 (08:44 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/be_acl/trunk@21107 735d13b6-9817-0410-8766-e36946ffe9aa

17 files changed:
doc/manual.sxw [new file with mode: 0755]
doc/wizard_form.dat [new file with mode: 0755]
doc/wizard_form.html [new file with mode: 0755]
ext_autoload.php [new file with mode: 0644]
ext_conf_template.txt [new file with mode: 0644]
ext_emconf.php [new file with mode: 0644]
ext_icon.gif [new file with mode: 0644]
ext_localconf.php [new file with mode: 0644]
ext_tables.php [new file with mode: 0644]
ext_tables.sql [new file with mode: 0644]
icon_tx_beacl_acl.gif [new file with mode: 0644]
locallang_db.php [new file with mode: 0644]
res/acl.js [new file with mode: 0644]
res/class.tx_beacl_userauthgroup.php [new file with mode: 0644]
res/class.ux_sc_mod_web_perm_index.php [new file with mode: 0644]
res/locallang_perm.php [new file with mode: 0644]
tca.php [new file with mode: 0644]

diff --git a/doc/manual.sxw b/doc/manual.sxw
new file mode 100755 (executable)
index 0000000..39f7757
Binary files /dev/null and b/doc/manual.sxw differ
diff --git a/doc/wizard_form.dat b/doc/wizard_form.dat
new file mode 100755 (executable)
index 0000000..9b22374
--- /dev/null
@@ -0,0 +1 @@
+a:4:{s:4:"save";a:2:{s:13:"extension_key";s:6:"be_acl";s:18:"print_wop_comments";s:1:"0";}s:6:"emconf";a:1:{i:1;a:7:{s:5:"title";s:12:"Backend ACLs";s:11:"description";s:28:"Backend Access Control Lists";s:8:"category";s:2:"be";s:5:"state";s:4:"beta";s:12:"dependencies";s:9:"cms, lang";s:6:"author";s:19:"Sebastian Kurfuerst";s:12:"author_email";s:26:"sebastian@garbage-group.de";}}s:6:"tables";a:1:{i:1;a:17:{s:9:"tablename";s:3:"acl";s:5:"title";s:20:"Access Control Lists";s:11:"add_deleted";s:1:"0";s:10:"add_hidden";s:1:"0";s:13:"add_starttime";s:1:"0";s:11:"add_endtime";s:1:"0";s:10:"add_access";s:1:"0";s:7:"sorting";s:1:"0";s:13:"sorting_field";s:4:"type";s:12:"sorting_desc";s:1:"0";s:10:"type_field";s:4:"type";s:12:"header_field";s:1:"0";s:7:"defIcon";s:11:"default.gif";s:14:"allow_on_pages";s:1:"1";s:23:"allow_ce_insert_records";s:1:"0";s:12:"save_and_new";s:1:"1";s:6:"fields";a:3:{i:1;a:18:{s:9:"fieldname";s:4:"type";s:5:"title";s:8:"ACL type";s:4:"type";s:6:"select";s:12:"excludeField";s:1:"1";s:7:"_DELETE";s:1:"0";s:18:"conf_select_item_0";s:4:"User";s:23:"conf_select_itemvalue_0";s:1:"0";s:18:"conf_select_item_1";s:5:"Group";s:23:"conf_select_itemvalue_1";s:1:"1";s:18:"conf_select_item_2";s:0:"";s:23:"conf_select_itemvalue_2";s:1:"2";s:18:"conf_select_item_3";s:0:"";s:23:"conf_select_itemvalue_3";s:1:"3";s:17:"conf_select_items";s:1:"2";s:17:"conf_select_icons";s:1:"0";s:14:"conf_relations";s:1:"1";s:22:"conf_relations_selsize";s:1:"1";s:15:"conf_select_pro";s:1:"0";}i:2;a:14:{s:9:"fieldname";s:9:"object_id";s:5:"title";s:16:"ID of User/Group";s:4:"type";s:3:"rel";s:12:"excludeField";s:1:"1";s:7:"_DELETE";s:1:"0";s:14:"conf_rel_table";s:8:"fe_users";s:13:"conf_rel_type";s:6:"select";s:18:"conf_rel_dummyitem";s:1:"0";s:14:"conf_relations";s:1:"1";s:22:"conf_relations_selsize";s:1:"1";s:17:"conf_relations_mm";s:1:"0";s:15:"conf_wiz_addrec";s:1:"0";s:16:"conf_wiz_listrec";s:1:"0";s:16:"conf_wiz_editrec";s:1:"0";}i:3;a:11:{s:9:"fieldname";s:11:"permissions";s:5:"title";s:11:"Permissions";s:4:"type";s:7:"check_4";s:12:"excludeField";s:1:"1";s:7:"_DELETE";s:1:"0";s:16:"conf_numberBoxes";s:1:"5";s:15:"conf_boxLabel_0";s:9:"Show page";s:15:"conf_boxLabel_1";s:12:"Edit content";s:15:"conf_boxLabel_2";s:9:"Edit page";s:15:"conf_boxLabel_3";s:11:"Delete page";s:15:"conf_boxLabel_4";s:9:"New pages";}}}}s:14:"moduleFunction";a:0:{}}
\ No newline at end of file
diff --git a/doc/wizard_form.html b/doc/wizard_form.html
new file mode 100755 (executable)
index 0000000..1d2b416
--- /dev/null
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+                       
+                       <html>
+                       <head>
+                               <title>Untitled</title>
+                       </head>
+                       
+                       <body>
+                               
+                               <table border=0 cellpadding=2 cellspacing=2><tr bgColor="#ABBBB4"><td><strong><span style="font-family:verdana,arial,sans-serif; font-size:10px;">General info</span></strong></td></tr><tr bgColor="#D9D5C9"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Enter general information about the extension here: Title, description, category, author...</span></td></tr><tr><td></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Title:</strong><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[emconf][1][title]:</font><BR><a name="260dbfdff6"></a><input type="text" name="kickstarter[wizArray_upd][emconf][1][title]" value="Backend ACLs" style="width:200px;" onChange="setFormAnchorPoint('260dbfdff6');" title="WOP: [emconf][1][title]"></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Description:</strong><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[emconf][1][description]:</font><BR><a name="e9cba6944a"></a><input type="text" name="kickstarter[wizArray_upd][emconf][1][description]" value="Backend Access Control Lists" style="width:200px;" onChange="setFormAnchorPoint('e9cba6944a');" title="WOP: [emconf][1][description]"></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Category:</strong><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[emconf][1][category]:</font><BR><a name="b46008f89f"></a><select name="kickstarter[wizArray_upd][emconf][1][category]" onChange="setFormAnchorPoint('b46008f89f');" title="WOP: [emconf][1][category]"><option value=""></option><option value="fe">Frontend</option><option value="plugin">Frontend Plugins</option><option value="be" SELECTED>Backend</option><option value="module">Backend Modules</option><option value="services">Services</option><option value="example">Examples</option><option value="misc">Miscellaneous</option><option value="templates">Templates</option><option value="doc">Documentation</option></select></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>State</strong><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[emconf][1][state]:</font><BR><a name="dbd328a5a5"></a><select name="kickstarter[wizArray_upd][emconf][1][state]" onChange="setFormAnchorPoint('dbd328a5a5');" title="WOP: [emconf][1][state]"><option value="alpha">Alpha (Very initial development)</option><option value="beta" SELECTED>Beta (Under current development, should work partly)</option><option value="stable">Stable (Stable and used in production)</option><option value="experimental">Experimental (Nobody knows if this is going anywhere yet...)</option><option value="test">Test (Test extension, demonstrates concepts etc.)</option></select></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Dependencies (comma list of extkeys):</strong><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[emconf][1][dependencies]:</font><BR><a name="ce30f2d5ba"></a><input type="text" name="kickstarter[wizArray_upd][emconf][1][dependencies]" value="cms, lang" style="width:200px;" onChange="setFormAnchorPoint('ce30f2d5ba');" title="WOP: [emconf][1][dependencies]"></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Author Name:</strong><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[emconf][1][author]:</font><BR><a name="5317cdfcff"></a><input type="text" name="kickstarter[wizArray_upd][emconf][1][author]" value="Sebastian Kurfuerst" style="width:200px;" onChange="setFormAnchorPoint('5317cdfcff');" title="WOP: [emconf][1][author]"></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Author email:</strong><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[emconf][1][author_email]:</font><BR><a name="58289f4384"></a><input type="text" name="kickstarter[wizArray_upd][emconf][1][author_email]" value="sebastian@garbage-group.de" style="width:200px;" onChange="setFormAnchorPoint('58289f4384');" title="WOP: [emconf][1][author_email]"></span></td></tr></table><HR><table border=0 cellpadding=2 cellspacing=2><tr bgColor="#ABBBB4"><td><strong><span style="font-family:verdana,arial,sans-serif; font-size:10px;">New Database Tables</span></strong></td></tr><tr bgColor="#D9D5C9"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Add database tables which can be edited inside the backend. These tables will be added to the global TCA array in TYPO3.</span></td></tr><tr><td></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Tablename:</strong><BR>tx_beacl_<font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][tablename]:</font><BR><a name="eaea358363"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][tablename]" value="acl" style="width:200px;" onChange="setFormAnchorPoint('eaea358363');" title="WOP: [tables][1][tablename]"><BR><strong>Notice:</strong> Use characters a-z0-9 only. Only lowercase, no spaces.<BR>
+                               This becomes the table name in the database. </span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Title of the table:</strong><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][title]:</font><BR><a name="dc5d9257e8"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][title]" value="Access Control Lists" style="width:200px;" onChange="setFormAnchorPoint('dc5d9257e8');" title="WOP: [tables][1][title]"> [English]</span></td></tr><tr bgColor="#ABBBB4"><td><strong> Fields Overview </strong></td></tr><tr><td></td></tr><tr bgColor="#F7F3EF"><td><table><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><tr  bgColor="#D9D5C9">
+                                       <td><strong>Name</strong></td>
+                                       <td><strong>Title</strong></td>
+                                       <td><strong>Type</strong></td>
+                                       <td><strong>Exclude?</strong></td>
+                                       <td><strong>Details</strong></td>
+                               </tr><tr><td>type</td><td>ACL type</td><td>Selectorbox</td><td></td><td>2 options</td><tr><td>object_id</td><td>ID of User/Group</td><td>Database relation</td><td></td><td>fe_users</td><tr><td>permissions</td><td>Permissions</td><td>Checkbox, 4 boxes in a row</td><td></td><td>5 checkboxes</td></span></table></td></tr><tr bgColor="#ABBBB4"><td><strong> Edit Fields </strong></td></tr><tr><td></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][add_deleted]:</font><BR><a name="9272a1fd29"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][add_deleted]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][add_deleted]" value="1" onClick="setFormAnchorPoint('9272a1fd29');" title="WOP: [tables][1][add_deleted]">Add 'Deleted' field  <a href="#" title="Whole system: If a table has a deleted column, records are never really deleted, just 'marked deleted'. Thus deleted records can actually be restored by clearing a deleted-flag later.
+Notice that all attached files are also not deleted from the server, so if you expect the table to hold some heavy size uploads, maybe you should not set this..." style="cursor:help" onClick="alert(String.fromCharCode(87,104,111,108,101,32,115,121,115,116,101,109,58,32,73,102,32,97,32,116,97,98,108,101,32,104,97,115,32,97,32,100,101,108,101,116,101,100,32,99,111,108,117,109,110,44,32,114,101,99,111,114,100,115,32,97,114,101,32,110,101,118,101,114,32,114,101,97,108,108,121,32,100,101,108,101,116,101,100,44,32,106,117,115,116,32,39,109,97,114,107,101,100,32,100,101,108,101,116,101,100,39,46,32,84,104,117,115,32,100,101,108,101,116,101,100,32,114,101,99,111,114,100,115,32,99,97,110,32,97,99,116,117,97,108,108,121,32,98,101,32,114,101,115,116,111,114,101,100,32,98,121,32,99,108,101,97,114,105,110,103,32,97,32,100,101,108,101,116,101,100,45,102,108,97,103,32,108,97,116,101,114,46,10,78,111,116,105,99,101,32,116,104,97,116,32,97,108,108,32,97,116,116,97,99,104,101,100,32,102,105,108,101,115,32,97,114,101,32,97,108,115,111,32,110,111,116,32,100,101,108,101,116,101,100,32,102,114,111,109,32,116,104,101,32,115,101,114,118,101,114,44,32,115,111,32,105,102,32,121,111,117,32,101,120,112,101,99,116,32,116,104,101,32,116,97,98,108,101,32,116,111,32,104,111,108,100,32,115,111,109,101,32,104,101,97,118,121,32,115,105,122,101,32,117,112,108,111,97,100,115,44,32,109,97,121,98,101,32,121,111,117,32,115,104,111,117,108,100,32,110,111,116,32,115,101,116,32,116,104,105,115,46,46,46));return false;">(What is this?)</a><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][add_hidden]:</font><BR><a name="0fe022d591"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][add_hidden]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][add_hidden]" value="1" onClick="setFormAnchorPoint('0fe022d591');" title="WOP: [tables][1][add_hidden]">Add 'Hidden' flag  <a href="#" title="Frontend: The 'Hidden' flag will prevent the record from being displayed on the frontend." style="cursor:help" onClick="alert(String.fromCharCode(70,114,111,110,116,101,110,100,58,32,84,104,101,32,39,72,105,100,100,101,110,39,32,102,108,97,103,32,119,105,108,108,32,112,114,101,118,101,110,116,32,116,104,101,32,114,101,99,111,114,100,32,102,114,111,109,32,98,101,105,110,103,32,100,105,115,112,108,97,121,101,100,32,111,110,32,116,104,101,32,102,114,111,110,116,101,110,100,46));return false;">(What is this?)</a><BR><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][add_starttime]:</font><BR><a name="8624de0b56"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][add_starttime]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][add_starttime]" value="1" onClick="setFormAnchorPoint('8624de0b56');" title="WOP: [tables][1][add_starttime]">Add 'Starttime'  <a href="#" title="Frontend: If a 'Starttime' is set, the record will not be visible on the website, before that date arrives." style="cursor:help" onClick="alert(String.fromCharCode(70,114,111,110,116,101,110,100,58,32,73,102,32,97,32,39,83,116,97,114,116,116,105,109,101,39,32,105,115,32,115,101,116,44,32,116,104,101,32,114,101,99,111,114,100,32,119,105,108,108,32,110,111,116,32,98,101,32,118,105,115,105,98,108,101,32,111,110,32,116,104,101,32,119,101,98,115,105,116,101,44,32,98,101,102,111,114,101,32,116,104,97,116,32,100,97,116,101,32,97,114,114,105,118,101,115,46));return false;">(What is this?)</a><BR><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][add_endtime]:</font><BR><a name="653fb46a0c"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][add_endtime]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][add_endtime]" value="1" onClick="setFormAnchorPoint('653fb46a0c');" title="WOP: [tables][1][add_endtime]">Add 'Endtime'  <a href="#" title="Frontend: If a 'Endtime' is set, the record will be hidden from that date and into the future." style="cursor:help" onClick="alert(String.fromCharCode(70,114,111,110,116,101,110,100,58,32,73,102,32,97,32,39,69,110,100,116,105,109,101,39,32,105,115,32,115,101,116,44,32,116,104,101,32,114,101,99,111,114,100,32,119,105,108,108,32,98,101,32,104,105,100,100,101,110,32,102,114,111,109,32,116,104,97,116,32,100,97,116,101,32,97,110,100,32,105,110,116,111,32,116,104,101,32,102,117,116,117,114,101,46));return false;">(What is this?)</a><BR><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][add_access]:</font><BR><a name="f968a89b45"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][add_access]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][add_access]" value="1" onClick="setFormAnchorPoint('f968a89b45');" title="WOP: [tables][1][add_access]">Add 'Access group'  <a href="#" title="Frontend: If a frontend user group is set for a record, only frontend users that are members of that group will be able to see the record." style="cursor:help" onClick="alert(String.fromCharCode(70,114,111,110,116,101,110,100,58,32,73,102,32,97,32,102,114,111,110,116,101,110,100,32,117,115,101,114,32,103,114,111,117,112,32,105,115,32,115,101,116,32,102,111,114,32,97,32,114,101,99,111,114,100,44,32,111,110,108,121,32,102,114,111,110,116,101,110,100,32,117,115,101,114,115,32,116,104,97,116,32,97,114,101,32,109,101,109,98,101,114,115,32,111,102,32,116,104,97,116,32,103,114,111,117,112,32,119,105,108,108,32,98,101,32,97,98,108,101,32,116,111,32,115,101,101,32,116,104,101,32,114,101,99,111,114,100,46));return false;">(What is this?)</a><BR><BR></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][sorting]:</font><BR><a name="3eb5780bca"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][sorting]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][sorting]" value="1" onClick="setFormAnchorPoint('3eb5780bca');" title="WOP: [tables][1][sorting]">Manual ordering of records  <a href="#" title="If set, the records can be moved up and down relative to each other in the backend. Just like Content Elements. Otherwise they are sorted automatically by any field you specify" style="cursor:help" onClick="alert(String.fromCharCode(73,102,32,115,101,116,44,32,116,104,101,32,114,101,99,111,114,100,115,32,99,97,110,32,98,101,32,109,111,118,101,100,32,117,112,32,97,110,100,32,100,111,119,110,32,114,101,108,97,116,105,118,101,32,116,111,32,101,97,99,104,32,111,116,104,101,114,32,105,110,32,116,104,101,32,98,97,99,107,101,110,100,46,32,74,117,115,116,32,108,105,107,101,32,67,111,110,116,101,110,116,32,69,108,101,109,101,110,116,115,46,32,79,116,104,101,114,119,105,115,101,32,116,104,101,121,32,97,114,101,32,115,111,114,116,101,100,32,97,117,116,111,109,97,116,105,99,97,108,108,121,32,98,121,32,97,110,121,32,102,105,101,108,100,32,121,111,117,32,115,112,101,99,105,102,121));return false;">(What is this?)</a><blockquote>If 'Manual ordering' is not set, order the table by this field:<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][sorting_field]:</font><BR><a name="79955aed7f"></a><select name="kickstarter[wizArray_upd][tables][1][sorting_field]" onChange="setFormAnchorPoint('79955aed7f');" title="WOP: [tables][1][sorting_field]"><option value="crdate">[crdate]</option><option value="cruser_id">[cruser_id]</option><option value="tstamp">[tstamp]</option><option value="type" SELECTED>type: ACL type</option><option value="object_id">object_id: ID of User/Group</option><option value="permissions">permissions: Permissions</option></select><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][sorting_desc]:</font><BR><a name="76ceb55890"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][sorting_desc]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][sorting_desc]" value="1" onClick="setFormAnchorPoint('76ceb55890');" title="WOP: [tables][1][sorting_desc]"> Descending</blockquote></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>'Type-field', if any:<BR></strong><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][type_field]:</font><BR><a name="acd96759da"></a><select name="kickstarter[wizArray_upd][tables][1][type_field]" onChange="setFormAnchorPoint('acd96759da');" title="WOP: [tables][1][type_field]"><option value="0">[none]</option><option value="type" SELECTED>type: ACL type</option><option value="object_id">object_id: ID of User/Group</option><option value="permissions">permissions: Permissions</option></select> <a href="#" title="A 'type-field' is the field in the table which determines how the form is rendered in the backend, eg. which fields are shown under which circumstances.
+For instance the Content Element table 'tt_content' has a type-field, CType. The value of this field determines if the editing form shows the bodytext field as is the case when the type is 'Text' or if also the image-field should be shown as when the type is 'Text w/Image'" style="cursor:help" onClick="alert(String.fromCharCode(65,32,39,116,121,112,101,45,102,105,101,108,100,39,32,105,115,32,116,104,101,32,102,105,101,108,100,32,105,110,32,116,104,101,32,116,97,98,108,101,32,119,104,105,99,104,32,100,101,116,101,114,109,105,110,101,115,32,104,111,119,32,116,104,101,32,102,111,114,109,32,105,115,32,114,101,110,100,101,114,101,100,32,105,110,32,116,104,101,32,98,97,99,107,101,110,100,44,32,101,103,46,32,119,104,105,99,104,32,102,105,101,108,100,115,32,97,114,101,32,115,104,111,119,110,32,117,110,100,101,114,32,119,104,105,99,104,32,99,105,114,99,117,109,115,116,97,110,99,101,115,46,10,70,111,114,32,105,110,115,116,97,110,99,101,32,116,104,101,32,67,111,110,116,101,110,116,32,69,108,101,109,101,110,116,32,116,97,98,108,101,32,39,116,116,95,99,111,110,116,101,110,116,39,32,104,97,115,32,97,32,116,121,112,101,45,102,105,101,108,100,44,32,67,84,121,112,101,46,32,84,104,101,32,118,97,108,117,101,32,111,102,32,116,104,105,115,32,102,105,101,108,100,32,100,101,116,101,114,109,105,110,101,115,32,105,102,32,116,104,101,32,101,100,105,116,105,110,103,32,102,111,114,109,32,115,104,111,119,115,32,116,104,101,32,98,111,100,121,116,101,120,116,32,102,105,101,108,100,32,97,115,32,105,115,32,116,104,101,32,99,97,115,101,32,119,104,101,110,32,116,104,101,32,116,121,112,101,32,105,115,32,39,84,101,120,116,39,32,111,114,32,105,102,32,97,108,115,111,32,116,104,101,32,105,109,97,103,101,45,102,105,101,108,100,32,115,104,111,117,108,100,32,98,101,32,115,104,111,119,110,32,97,115,32,119,104,101,110,32,116,104,101,32,116,121,112,101,32,105,115,32,39,84,101,120,116,32,119,47,73,109,97,103,101,39));return false;">(What is this?)</a></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Label-field:<BR></strong><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][header_field]:</font><BR><a name="baa714a2a8"></a><select name="kickstarter[wizArray_upd][tables][1][header_field]" onChange="setFormAnchorPoint('baa714a2a8');" title="WOP: [tables][1][header_field]"><option value="0" SELECTED>[none]</option><option value="type">type: ACL type</option><option value="object_id">object_id: ID of User/Group</option><option value="permissions">permissions: Permissions</option></select> <a href="#" title="A 'label-field' is the field used as record title in the backend." style="cursor:help" onClick="alert(String.fromCharCode(65,32,39,108,97,98,101,108,45,102,105,101,108,100,39,32,105,115,32,116,104,101,32,102,105,101,108,100,32,117,115,101,100,32,97,115,32,114,101,99,111,114,100,32,116,105,116,108,101,32,105,110,32,116,104,101,32,98,97,99,107,101,110,100,46));return false;">(What is this?)</a></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][defIcon]:</font><BR><a name="137de2c3a6"></a><select name="kickstarter[wizArray_upd][tables][1][defIcon]" onChange="setFormAnchorPoint('137de2c3a6');" title="WOP: [tables][1][defIcon]"><option value="default.gif" SELECTED>Default (white)</option><option value="default_black.gif">Black</option><option value="default_gray4.gif">Gray</option><option value="default_blue.gif">Blue</option><option value="default_green.gif">Green</option><option value="default_red.gif">Red</option><option value="default_yellow.gif">Yellow</option><option value="default_purple.gif">Purple</option></select> Default icon  <a href="#" title="All tables have at least one associated icon. Select which default icon you wish. You can always substitute the file with another." style="cursor:help" onClick="alert(String.fromCharCode(65,108,108,32,116,97,98,108,101,115,32,104,97,118,101,32,97,116,32,108,101,97,115,116,32,111,110,101,32,97,115,115,111,99,105,97,116,101,100,32,105,99,111,110,46,32,83,101,108,101,99,116,32,119,104,105,99,104,32,100,101,102,97,117,108,116,32,105,99,111,110,32,121,111,117,32,119,105,115,104,46,32,89,111,117,32,99,97,110,32,97,108,119,97,121,115,32,115,117,98,115,116,105,116,117,116,101,32,116,104,101,32,102,105,108,101,32,119,105,116,104,32,97,110,111,116,104,101,114,46));return false;">(What is this?)</a></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Allowed on pages:<BR></strong><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][allow_on_pages]:</font><BR><a name="3ab0de4e3a"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][allow_on_pages]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][allow_on_pages]" value="1" CHECKED onClick="setFormAnchorPoint('3ab0de4e3a');" title="WOP: [tables][1][allow_on_pages]"> Allow records from this table to be created on regular pages.</span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Allowed in 'Insert Records' field in content elements:<BR></strong><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][allow_ce_insert_records]:</font><BR><a name="55468e6cbd"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][allow_ce_insert_records]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][allow_ce_insert_records]" value="1" onClick="setFormAnchorPoint('55468e6cbd');" title="WOP: [tables][1][allow_ce_insert_records]"> Allow records from this table to be linked to by content elements.</span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Add 'Save and new' button in forms:<BR></strong><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][save_and_new]:</font><BR><a name="ea3495b007"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][save_and_new]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][save_and_new]" value="1" CHECKED onClick="setFormAnchorPoint('ea3495b007');" title="WOP: [tables][1][save_and_new]"> Will add an additional save-button to forms by which you can save the item and instantly create the next.</span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Notice on fieldnames:<BR></strong>Don't use fieldnames from this list of reserved names/words: <BR>
+                               <blockquote><em>uid, pid, endtime, starttime, sorting, fe_group, hidden, deleted, cruser_id, crdate, tstamp, data, table, field, key, desc</em></blockquote></span></td></tr><tr bgColor="#D9D5C9"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>FIELD:</strong> <em>type</em></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><table border=0 cellpadding=0 cellspacing=0>
+                       <tr><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field name:</span></td><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][1][fieldname]:</font><BR><a name="43bdd40f96"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][1][fieldname]" value="type" style="width:200px;" onChange="setFormAnchorPoint('43bdd40f96');" title="WOP: [tables][1][fields][1][fieldname]"> (Remove:<font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][1][_DELETE]:</font><BR><a name="c5cf6bb40e"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][fields][1][_DELETE]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][fields][1][_DELETE]" value="1" onClick="setFormAnchorPoint('c5cf6bb40e');" title="WOP: [tables][1][fields][1][_DELETE]">)<input type="image" hspace=2 src="../../../../typo3/gfx/pil2up.gif" name="kickstarter_CMD_type_UP" onClick="setFormAnchorPoint('43bdd40f96');"><input type="image" hspace=2 src="../../../../typo3/gfx/pil2down.gif" name="kickstarter_CMD_type_DOWN" onClick="setFormAnchorPoint('43bdd40f96');"><input type="image" hspace=2 src="../../../../typo3/gfx/savesnapshot.gif" name="kickstarter_CMD_type_SAVE" onClick="setFormAnchorPoint('43bdd40f96');" title="Save this field setting as a preset."></span></td></tr>
+                       <tr><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field title:</span></td><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][1][title]:</font><BR><a name="84135628ec"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][1][title]" value="ACL type" style="width:200px;" onChange="setFormAnchorPoint('84135628ec');" title="WOP: [tables][1][fields][1][title]"> [English]</span></td></tr>
+                       <tr><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][1][type]:</font><BR><a name="49d2551d6d"></a><select name="kickstarter[wizArray_upd][tables][1][fields][1][type]" onChange="setFormAnchorPoint('49d2551d6d');" title="WOP: [tables][1][fields][1][type]"><option value=""></option><option value="input">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select" SELECTED>Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][1][excludeField]:</font><BR><a name="1c283ce973"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][fields][1][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][fields][1][excludeField]" value="1" CHECKED onClick="setFormAnchorPoint('1c283ce973');" title="WOP: [tables][1][fields][1][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked 'Exclude-field', users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.
+In other words, if a field is marked 'Exclude-field' you can control which users can edit it and which cannot." style="cursor:help" onClick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,39,69,120,99,108,117,100,101,45,102,105,101,108,100,39,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,10,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,39,69,120,99,108,117,100,101,45,102,105,101,108,100,39,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return false;">(What is this?)</a><BR><BR><blockquote><BR><strong>Define values:</strong><BR><table border=0 cellpadding=2 cellspacing=2><tr>
+                                               <td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Item label:</span></td>
+                                               <td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Item value:</span></td>
+                                       </tr><tr>
+                                               <td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][1][conf_select_item_0]:</font><BR><a name="6f2d1e9b59"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][1][conf_select_item_0]" value="User" style="width:200px;" onChange="setFormAnchorPoint('6f2d1e9b59');" title="WOP: [tables][1][fields][1][conf_select_item_0]"> [English]</span></td>
+                                               <td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][1][conf_select_itemvalue_0]:</font><BR><a name="12fb5947db"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][1][conf_select_itemvalue_0]" value="0" style="width:50px;" onChange="setFormAnchorPoint('12fb5947db');" title="WOP: [tables][1][fields][1][conf_select_itemvalue_0]"></span></td>
+                                       </tr><tr>
+                                               <td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][1][conf_select_item_1]:</font><BR><a name="b5442c74f4"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][1][conf_select_item_1]" value="Group" style="width:200px;" onChange="setFormAnchorPoint('b5442c74f4');" title="WOP: [tables][1][fields][1][conf_select_item_1]"> [English]</span></td>
+                                               <td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][1][conf_select_itemvalue_1]:</font><BR><a name="14fa6e38b9"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][1][conf_select_itemvalue_1]" value="1" style="width:50px;" onChange="setFormAnchorPoint('14fa6e38b9');" title="WOP: [tables][1][fields][1][conf_select_itemvalue_1]"></span></td>
+                                       </tr></table><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][1][conf_select_items]:</font><BR><a name="bcf42d3e3d"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][1][conf_select_items]" value="2" style="width:50px;" onChange="setFormAnchorPoint('bcf42d3e3d');" title="WOP: [tables][1][fields][1][conf_select_items]"> Number of values<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][1][conf_select_icons]:</font><BR><a name="97097cd2b3"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][fields][1][conf_select_icons]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][fields][1][conf_select_icons]" value="1" onClick="setFormAnchorPoint('97097cd2b3');" title="WOP: [tables][1][fields][1][conf_select_icons]">Add a dummy set of icons<BR><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][1][conf_relations]:</font><BR><a name="6917616878"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][1][conf_relations]" value="1" style="width:50px;" onChange="setFormAnchorPoint('6917616878');" title="WOP: [tables][1][fields][1][conf_relations]"> Max number of relations<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][1][conf_relations_selsize]:</font><BR><a name="e784887fad"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][1][conf_relations_selsize]" value="1" style="width:50px;" onChange="setFormAnchorPoint('e784887fad');" title="WOP: [tables][1][fields][1][conf_relations_selsize]"> Size of selector box<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][1][conf_select_pro]:</font><BR><a name="9b48439c67"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][fields][1][conf_select_pro]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][fields][1][conf_select_pro]" value="1" onClick="setFormAnchorPoint('9b48439c67');" title="WOP: [tables][1][fields][1][conf_select_pro]">Add pre-processing with PHP-function<BR></blockquote></span></td></tr>
+               </table></span></td></tr><tr bgColor="#D9D5C9"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>FIELD:</strong> <em>object_id</em></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><table border=0 cellpadding=0 cellspacing=0>
+                       <tr><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field name:</span></td><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][2][fieldname]:</font><BR><a name="2a46622dd0"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][2][fieldname]" value="object_id" style="width:200px;" onChange="setFormAnchorPoint('2a46622dd0');" title="WOP: [tables][1][fields][2][fieldname]"> (Remove:<font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][2][_DELETE]:</font><BR><a name="8724b1f858"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][fields][2][_DELETE]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][fields][2][_DELETE]" value="1" onClick="setFormAnchorPoint('8724b1f858');" title="WOP: [tables][1][fields][2][_DELETE]">)<input type="image" hspace=2 src="../../../../typo3/gfx/pil2up.gif" name="kickstarter_CMD_object_id_UP" onClick="setFormAnchorPoint('2a46622dd0');"><input type="image" hspace=2 src="../../../../typo3/gfx/pil2down.gif" name="kickstarter_CMD_object_id_DOWN" onClick="setFormAnchorPoint('2a46622dd0');"><input type="image" hspace=2 src="../../../../typo3/gfx/savesnapshot.gif" name="kickstarter_CMD_object_id_SAVE" onClick="setFormAnchorPoint('2a46622dd0');" title="Save this field setting as a preset."></span></td></tr>
+                       <tr><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field title:</span></td><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][2][title]:</font><BR><a name="1ffb5edc16"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][2][title]" value="ID of User/Group" style="width:200px;" onChange="setFormAnchorPoint('1ffb5edc16');" title="WOP: [tables][1][fields][2][title]"> [English]</span></td></tr>
+                       <tr><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][2][type]:</font><BR><a name="e759d6fc5e"></a><select name="kickstarter[wizArray_upd][tables][1][fields][2][type]" onChange="setFormAnchorPoint('e759d6fc5e');" title="WOP: [tables][1][fields][2][type]"><option value=""></option><option value="input">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel" SELECTED>Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][2][excludeField]:</font><BR><a name="d2c935c83d"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][fields][2][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][fields][2][excludeField]" value="1" CHECKED onClick="setFormAnchorPoint('d2c935c83d');" title="WOP: [tables][1][fields][2][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked 'Exclude-field', users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.
+In other words, if a field is marked 'Exclude-field' you can control which users can edit it and which cannot." style="cursor:help" onClick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,39,69,120,99,108,117,100,101,45,102,105,101,108,100,39,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,10,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,39,69,120,99,108,117,100,101,45,102,105,101,108,100,39,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return false;">(What is this?)</a><BR><BR><blockquote><BR>Create relation to table:<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][2][conf_rel_table]:</font><BR><a name="8d7769159f"></a><select name="kickstarter[wizArray_upd][tables][1][fields][2][conf_rel_table]" onChange="setFormAnchorPoint('8d7769159f');" title="WOP: [tables][1][fields][2][conf_rel_table]"><option value="pages">Pages table, (pages)</option><option value="fe_users" SELECTED>Frontend Users, (fe_users)</option><option value="fe_groups">Frontend Usergroups, (fe_groups)</option><option value="tt_content">Content elements, (tt_content)</option><option value="_CUSTOM">Custom table (enter name below)</option><option value="tx_beacl_acl">Extension table: Access Control Lists (tx_beacl_acl)</option></select><BR><BR>Type:<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][2][conf_rel_type]:</font><BR><a name="9a5204cfcc"></a><select name="kickstarter[wizArray_upd][tables][1][fields][2][conf_rel_type]" onChange="setFormAnchorPoint('9a5204cfcc');" title="WOP: [tables][1][fields][2][conf_rel_type]"><option value="group">Field with Element Browser</option><option value="select" SELECTED>Selectorbox, select global</option><option value="select_cur">Selectorbox, select from current page</option><option value="select_root">Selectorbox, select from root page</option><option value="select_storage">Selectorbox, select from storage page</option></select><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][2][conf_rel_dummyitem]:</font><BR><a name="99df727512"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][fields][2][conf_rel_dummyitem]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][fields][2][conf_rel_dummyitem]" value="1" onClick="setFormAnchorPoint('99df727512');" title="WOP: [tables][1][fields][2][conf_rel_dummyitem]">Add a blank item to the selector<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][2][conf_relations]:</font><BR><a name="c36db2b4d0"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][2][conf_relations]" value="1" style="width:50px;" onChange="setFormAnchorPoint('c36db2b4d0');" title="WOP: [tables][1][fields][2][conf_relations]"> Max number of relations<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][2][conf_relations_selsize]:</font><BR><a name="05c713f234"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][2][conf_relations_selsize]" value="1" style="width:50px;" onChange="setFormAnchorPoint('05c713f234');" title="WOP: [tables][1][fields][2][conf_relations_selsize]"> Size of selector box<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][2][conf_relations_mm]:</font><BR><a name="a0411ec0f6"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][fields][2][conf_relations_mm]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][fields][2][conf_relations_mm]" value="1" onClick="setFormAnchorPoint('a0411ec0f6');" title="WOP: [tables][1][fields][2][conf_relations_mm]">True M-M relations (otherwise commalist of values)<BR><BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][2][conf_wiz_addrec]:</font><BR><a name="6c5724f508"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][fields][2][conf_wiz_addrec]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][fields][2][conf_wiz_addrec]" value="1" onClick="setFormAnchorPoint('6c5724f508');" title="WOP: [tables][1][fields][2][conf_wiz_addrec]">Add 'Add record' link<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][2][conf_wiz_listrec]:</font><BR><a name="38775ac37d"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][fields][2][conf_wiz_listrec]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][fields][2][conf_wiz_listrec]" value="1" onClick="setFormAnchorPoint('38775ac37d');" title="WOP: [tables][1][fields][2][conf_wiz_listrec]">Add 'List records' link<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][2][conf_wiz_editrec]:</font><BR><a name="a75eed816c"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][fields][2][conf_wiz_editrec]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][fields][2][conf_wiz_editrec]" value="1" onClick="setFormAnchorPoint('a75eed816c');" title="WOP: [tables][1][fields][2][conf_wiz_editrec]">Add 'Edit record' link<BR><BR></blockquote></span></td></tr>
+               </table></span></td></tr><tr bgColor="#D9D5C9"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>FIELD:</strong> <em>permissions</em></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><table border=0 cellpadding=0 cellspacing=0>
+                       <tr><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field name:</span></td><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][3][fieldname]:</font><BR><a name="1cbf5eeede"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][3][fieldname]" value="permissions" style="width:200px;" onChange="setFormAnchorPoint('1cbf5eeede');" title="WOP: [tables][1][fields][3][fieldname]"> (Remove:<font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][3][_DELETE]:</font><BR><a name="2f7b0a2202"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][fields][3][_DELETE]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][fields][3][_DELETE]" value="1" onClick="setFormAnchorPoint('2f7b0a2202');" title="WOP: [tables][1][fields][3][_DELETE]">)<input type="image" hspace=2 src="../../../../typo3/gfx/pil2up.gif" name="kickstarter_CMD_permissions_UP" onClick="setFormAnchorPoint('1cbf5eeede');"><input type="image" hspace=2 src="../../../../typo3/gfx/pil2down.gif" name="kickstarter_CMD_permissions_DOWN" onClick="setFormAnchorPoint('1cbf5eeede');"><input type="image" hspace=2 src="../../../../typo3/gfx/savesnapshot.gif" name="kickstarter_CMD_permissions_SAVE" onClick="setFormAnchorPoint('1cbf5eeede');" title="Save this field setting as a preset."></span></td></tr>
+                       <tr><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field title:</span></td><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][3][title]:</font><BR><a name="1fe9dcf161"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][3][title]" value="Permissions" style="width:200px;" onChange="setFormAnchorPoint('1fe9dcf161');" title="WOP: [tables][1][fields][3][title]"> [English]</span></td></tr>
+                       <tr><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][3][type]:</font><BR><a name="cb453f20d8"></a><select name="kickstarter[wizArray_upd][tables][1][fields][3][type]" onChange="setFormAnchorPoint('cb453f20d8');" title="WOP: [tables][1][fields][3][type]"><option value=""></option><option value="input">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4" SELECTED>Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][3][excludeField]:</font><BR><a name="1d17e967a5"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][fields][3][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][fields][3][excludeField]" value="1" CHECKED onClick="setFormAnchorPoint('1d17e967a5');" title="WOP: [tables][1][fields][3][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked 'Exclude-field', users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.
+In other words, if a field is marked 'Exclude-field' you can control which users can edit it and which cannot." style="cursor:help" onClick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,39,69,120,99,108,117,100,101,45,102,105,101,108,100,39,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,10,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,39,69,120,99,108,117,100,101,45,102,105,101,108,100,39,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return false;">(What is this?)</a><BR><BR><blockquote><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][3][conf_numberBoxes]:</font><BR><a name="4b7f42f976"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][3][conf_numberBoxes]" value="5" style="width:50px;" onChange="setFormAnchorPoint('4b7f42f976');" title="WOP: [tables][1][fields][3][conf_numberBoxes]"> Number of checkboxes<BR><BR>Label 1:<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][3][conf_boxLabel_0]:</font><BR><a name="efd35c2d39"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][3][conf_boxLabel_0]" value="Show page" style="width:200px;" onChange="setFormAnchorPoint('efd35c2d39');" title="WOP: [tables][1][fields][3][conf_boxLabel_0]"> [English]<BR>Label 2:<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][3][conf_boxLabel_1]:</font><BR><a name="52758d1d7c"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][3][conf_boxLabel_1]" value="Edit content" style="width:200px;" onChange="setFormAnchorPoint('52758d1d7c');" title="WOP: [tables][1][fields][3][conf_boxLabel_1]"> [English]<BR>Label 3:<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][3][conf_boxLabel_2]:</font><BR><a name="a9c7ab1590"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][3][conf_boxLabel_2]" value="Edit page" style="width:200px;" onChange="setFormAnchorPoint('a9c7ab1590');" title="WOP: [tables][1][fields][3][conf_boxLabel_2]"> [English]<BR>Label 4:<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][3][conf_boxLabel_3]:</font><BR><a name="0bbfca06de"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][3][conf_boxLabel_3]" value="Delete page" style="width:200px;" onChange="setFormAnchorPoint('0bbfca06de');" title="WOP: [tables][1][fields][3][conf_boxLabel_3]"> [English]<BR>Label 5:<BR><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][3][conf_boxLabel_4]:</font><BR><a name="79e3cf8774"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][3][conf_boxLabel_4]" value="New pages" style="width:200px;" onChange="setFormAnchorPoint('79e3cf8774');" title="WOP: [tables][1][fields][3][conf_boxLabel_4]"> [English]</blockquote></span></td></tr>
+               </table></span></td></tr><tr bgColor="#D9D5C9"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>NEW FIELD:</strong></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><table border=0 cellpadding=0 cellspacing=0>
+                       <tr><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field name:</span></td><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][4][fieldname]:</font><BR><a name="cc376425eb"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][4][fieldname]" value="" style="width:200px;" onChange="setFormAnchorPoint('cc376425eb');" title="WOP: [tables][1][fields][4][fieldname]"></span></td></tr>
+                       <tr><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field title:</span></td><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][4][title]:</font><BR><a name="5f6440374b"></a><input type="text" name="kickstarter[wizArray_upd][tables][1][fields][4][title]" value="" style="width:200px;" onChange="setFormAnchorPoint('5f6440374b');" title="WOP: [tables][1][fields][4][title]"> [English]</span></td></tr>
+                       <tr><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign=top><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][4][type]:</font><BR><a name="66912aaa41"></a><select name="kickstarter[wizArray_upd][tables][1][fields][4][type]" onChange="setFormAnchorPoint('66912aaa41');" title="WOP: [tables][1][fields][4][type]"><option value="" SELECTED></option><option value="input">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><font face="verdana,arial,sans-serif" size=1 color=#999999>[tables][1][fields][4][excludeField]:</font><BR><a name="e0aa93cd37"></a><input type="hidden" name="kickstarter[wizArray_upd][tables][1][fields][4][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][tables][1][fields][4][excludeField]" value="1" CHECKED onClick="setFormAnchorPoint('e0aa93cd37');" title="WOP: [tables][1][fields][4][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked 'Exclude-field', users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.
+In other words, if a field is marked 'Exclude-field' you can control which users can edit it and which cannot." style="cursor:help" onClick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,39,69,120,99,108,117,100,101,45,102,105,101,108,100,39,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,10,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,39,69,120,99,108,117,100,101,45,102,105,101,108,100,39,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return false;">(What is this?)</a><BR></span></td></tr>
+               </table></span></td></tr><tr bgColor="#F7F3EF"><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><BR><BR>Load preset fields: <BR><select name="kickstarter[_PRESET][]" size=6 multiple><option value="">__Fields picked up in this session__:</option><option value="be_acls-tables-1.type">be_acls-tables-1: ACL type (type, type: select)</option><option value="be_acls-tables-1.object_id">be_acls-tables-1: ID of User/Group (object_id, type: rel)</option><option value="be_acl-tables-1.type">be_acl-tables-1: ACL type (type, type: select)</option><option value="be_acl-tables-1.object_id">be_acl-tables-1: ID of User/Group (object_id, type: rel)</option><option value="be_acl-tables-1.permissions">be_acl-tables-1: Permissions (permissions, type: check_4)</option></select></span></td></tr></table>
+                       </body>
+                       </html>
\ No newline at end of file
diff --git a/ext_autoload.php b/ext_autoload.php
new file mode 100644 (file)
index 0000000..02db5a8
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+// DO NOT CHANGE THIS FILE! It is automatically generated by extdeveval::buildAutoloadRegistry.
+// This file was generated on 2009-04-25 20:13
+
+$extensionPath = t3lib_extMgm::extPath('be_acl');
+return array(
+       'tx_beacl_userauthgroup' => $extensionPath . 'res/class.tx_beacl_userauthgroup.php',
+);
+?>
\ No newline at end of file
diff --git a/ext_conf_template.txt b/ext_conf_template.txt
new file mode 100644 (file)
index 0000000..c1f34e2
--- /dev/null
@@ -0,0 +1,5 @@
+# cat=basic/enable; type=boolean; label=disable "old" User/Group/World permission system\r
+disableOldPermissionSystem = 0\r
+\r
+# cat=basic/enable; type=boolean; label=enable selector for users/groups - VERY useful if there are many ACLs\r
+enableFilterSelector = 1
\ No newline at end of file
diff --git a/ext_emconf.php b/ext_emconf.php
new file mode 100644 (file)
index 0000000..975024a
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+
+########################################################################
+# Extension Manager/Repository config file for ext: "be_acl"
+#
+# Auto generated 12-01-2009 16:57
+#
+# Manual updates:
+# Only the data in the array - anything else is removed by next write.
+# "version" and "dependencies" must not be touched!
+########################################################################
+
+$EM_CONF[$_EXTKEY] = array(
+       'title' => 'Backend ACLs',
+       'description' => 'Backend Access Control Lists',
+       'category' => 'be',
+       'shy' => 0,
+       'version' => '1.4.0',
+       'dependencies' => '',
+       'conflicts' => '',
+       'priority' => '',
+       'loadOrder' => '',
+       'module' => '',
+       'state' => 'stable',
+       'uploadfolder' => 0,
+       'createDirs' => '',
+       'modify_tables' => '',
+       'clearcacheonload' => 0,
+       'lockType' => '',
+       'author' => 'Sebastian Kurfuerst',
+       'author_email' => 'sebastian@garbage-group.de',
+       'author_company' => '',
+       'CGLcompliance' => '',
+       'CGLcompliance_note' => '',
+       'constraints' => array(
+               'depends' => array(
+                       'cms' => '',
+                       'lang' => '',
+                       'php' => '3.0.0-0.0.0',
+                       'typo3' => '3.5.0-0.0.0',
+               ),
+               'conflicts' => array(
+               ),
+               'suggests' => array(
+               ),
+       ),
+       '_md5_values_when_last_written' => 'a:15:{s:21:"ext_conf_template.txt";s:4:"23d5";s:12:"ext_icon.gif";s:4:"1bea";s:17:"ext_localconf.php";s:4:"5cdf";s:14:"ext_tables.php";s:4:"aceb";s:14:"ext_tables.sql";s:4:"1076";s:21:"icon_tx_beacl_acl.gif";s:4:"1bea";s:16:"locallang_db.php";s:4:"0f61";s:7:"tca.php";s:4:"01cc";s:14:"doc/manual.sxw";s:4:"4db3";s:19:"doc/wizard_form.dat";s:4:"e68f";s:20:"doc/wizard_form.html";s:4:"4e9b";s:10:"res/acl.js";s:4:"80ec";s:36:"res/class.tx_beacl_userauthgroup.php";s:4:"3d8c";s:38:"res/class.ux_sc_mod_web_perm_index.php";s:4:"4bb6";s:22:"res/locallang_perm.php";s:4:"9a96";}',
+);
+
+?>
\ No newline at end of file
diff --git a/ext_icon.gif b/ext_icon.gif
new file mode 100644 (file)
index 0000000..ad307d0
Binary files /dev/null and b/ext_icon.gif differ
diff --git a/ext_localconf.php b/ext_localconf.php
new file mode 100644 (file)
index 0000000..ae385f4
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+if (!defined ("TYPO3_MODE"))   die ("Access denied.");
+t3lib_extMgm::addUserTSConfig('
+       options.saveDocNew.tx_beacl_acl=1
+');
+
+
+
+require_once(t3lib_extMgm::extPath('be_acl').'res/class.tx_beacl_userauthgroup.php');
+$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['calcPerms'][] = 'tx_beacl_userAuthGroup->calcPerms';
+$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['getPagePermsClause'][] = 'tx_beacl_userAuthGroup->getPagePermsClause';
+
+
+
+$TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/web/perm/index.php'] = t3lib_extMgm::extPath('be_acl').'res/class.ux_sc_mod_web_perm_index.php';
+
+?>
\ No newline at end of file
diff --git a/ext_tables.php b/ext_tables.php
new file mode 100644 (file)
index 0000000..f0f11d4
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+if (!defined ("TYPO3_MODE"))   die ("Access denied.");
+
+t3lib_extMgm::allowTableOnStandardPages("tx_beacl_acl");
+
+$TCA["tx_beacl_acl"] = Array (
+       "ctrl" => Array (
+               "title" => "LLL:EXT:be_acl/locallang_db.php:tx_beacl_acl",
+               "label" => "uid",
+               "tstamp" => "tstamp",
+               "crdate" => "crdate",
+               "cruser_id" => "cruser_id",
+               "type" => "type",
+               "default_sortby" => "ORDER BY type",
+               "dynamicConfigFile" => t3lib_extMgm::extPath($_EXTKEY)."tca.php",
+               "iconfile" => t3lib_extMgm::extRelPath($_EXTKEY)."icon_tx_beacl_acl.gif",
+       ),
+       "feInterface" => Array (
+               "fe_admin_fieldList" => "type, object_id, permissions, recursive",
+       )
+);
+
+?>
\ No newline at end of file
diff --git a/ext_tables.sql b/ext_tables.sql
new file mode 100644 (file)
index 0000000..c560ab7
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# Table structure for table 'tx_beacl_acl'
+#
+CREATE TABLE tx_beacl_acl (
+       uid int(11) unsigned DEFAULT '0' NOT NULL auto_increment,
+       pid int(11) unsigned DEFAULT '0' NOT NULL,
+       tstamp int(11) unsigned DEFAULT '0' NOT NULL,
+       crdate int(11) unsigned DEFAULT '0' NOT NULL,
+       cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
+       type int(11) unsigned DEFAULT '0' NOT NULL,
+       object_id int(11) unsigned DEFAULT '0' NOT NULL,
+       permissions int(11) unsigned DEFAULT '0' NOT NULL,
+       recursive tinyint(1) unsigned DEFAULT '0' NOT NULL,
+       PRIMARY KEY (uid),
+       UNIQUE KEY uniqueacls (pid,type,object_id,recursive),
+       KEY parent (pid)
+);
\ No newline at end of file
diff --git a/icon_tx_beacl_acl.gif b/icon_tx_beacl_acl.gif
new file mode 100644 (file)
index 0000000..ad307d0
Binary files /dev/null and b/icon_tx_beacl_acl.gif differ
diff --git a/locallang_db.php b/locallang_db.php
new file mode 100644 (file)
index 0000000..8679d9e
--- /dev/null
@@ -0,0 +1,120 @@
+<?php
+/**
+ * Language labels for database tables/fields belonging to extension 'be_acl'
+ * 
+ * This file is detected by the translation tool.
+ */
+
+$LOCAL_LANG = Array (
+       'default' => Array (
+               'tx_beacl_acl' => 'Access Control Lists',
+               'tx_beacl_acl.type.I.0' => 'User',
+               'tx_beacl_acl.type.I.1' => 'Group',
+               'tx_beacl_acl.type' => 'ACL type',
+               'tx_beacl_acl.object_id' => 'ID of User/Group',
+               'tx_beacl_acl.permissions.I.0' => 'Show page',
+               'tx_beacl_acl.permissions.I.1' => 'Edit page',
+               'tx_beacl_acl.permissions.I.2' => 'Delete page',
+               'tx_beacl_acl.permissions.I.3' => 'New pages',
+               'tx_beacl_acl.permissions.I.4' => 'Edit content',
+               'tx_beacl_acl.permissions' => 'Permissions',
+               'tx_beacl_acl.recursive' => 'Rekursiv',
+       ),
+       'dk' => Array (
+               'tx_beacl_acl' => 'Adgangskontrollister',
+               'tx_beacl_acl.type.I.0' => 'Bruger',
+               'tx_beacl_acl.type.I.1' => 'Gruppe',
+               'tx_beacl_acl.type' => 'ACL type',
+               'tx_beacl_acl.object_id' => 'Bruger/gruppe ID',
+               'tx_beacl_acl.permissions.I.0' => 'Vis siden',
+               'tx_beacl_acl.permissions.I.1' => 'Redigér siden',
+               'tx_beacl_acl.permissions.I.2' => 'Slet siden',
+               'tx_beacl_acl.permissions.I.3' => 'Nye sider',
+               'tx_beacl_acl.permissions.I.4' => 'Redigér indhold',
+               'tx_beacl_acl.permissions' => 'Rettigheder',
+               'tx_beacl_acl.recursive' => 'Rekursiv',
+       ),
+       'de' => Array (
+       ),
+       'no' => Array (
+       ),
+       'it' => Array (
+       ),
+       'fr' => Array (
+       ),
+       'es' => Array (
+       ),
+       'nl' => Array (
+       ),
+       'cz' => Array (
+       ),
+       'pl' => Array (
+       ),
+       'si' => Array (
+       ),
+       'fi' => Array (
+       ),
+       'tr' => Array (
+       ),
+       'se' => Array (
+       ),
+       'pt' => Array (
+       ),
+       'ru' => Array (
+       ),
+       'ro' => Array (
+       ),
+       'ch' => Array (
+       ),
+       'sk' => Array (
+       ),
+       'lt' => Array (
+       ),
+       'is' => Array (
+       ),
+       'hr' => Array (
+       ),
+       'hu' => Array (
+       ),
+       'gl' => Array (
+       ),
+       'th' => Array (
+       ),
+       'gr' => Array (
+       ),
+       'hk' => Array (
+       ),
+       'eu' => Array (
+       ),
+       'bg' => Array (
+       ),
+       'br' => Array (
+       ),
+       'et' => Array (
+       ),
+       'ar' => Array (
+       ),
+       'he' => Array (
+       ),
+       'ua' => Array (
+       ),
+       'lv' => Array (
+       ),
+       'jp' => Array (
+       ),
+       'vn' => Array (
+       ),
+       'ca' => Array (
+       ),
+       'ba' => Array (
+       ),
+       'kr' => Array (
+       ),
+       'eo' => Array (
+       ),
+       'my' => Array (
+       ),
+       'hi' => Array (
+       ),
+);
+?>
\ No newline at end of file
diff --git a/res/acl.js b/res/acl.js
new file mode 100644 (file)
index 0000000..ef006f2
--- /dev/null
@@ -0,0 +1,224 @@
+var global_newACLs = new Array();
+var global_currentACLs = new Array(); // stores already saved ACLs
+
+/**
+ * generates new hidden field
+ *
+ * @param name of field
+ * @param value of field
+ */
+function createNewHiddenField (name, value) {
+       var hiddenFields = document.getElementById('insertHiddenFields');
+       var hiddenStore = document.createElement('input');
+       hiddenStore.setAttribute('type', 'hidden');
+       hiddenStore.setAttribute('value', value);
+       hiddenStore.setAttribute('name', name);
+       hiddenFields.appendChild(hiddenStore);
+}
+
+/**
+ * deletes an ACL
+ *
+ * @param ID of ACL
+ */
+function deleteACL (id) {
+       if(isNaN(id)) {
+                       // delete ACL by removing it from the DOM tree
+               var deleteLine = document.getElementsByName('data[tx_beacl_acl][' + id + '][type]')[0].parentNode.parentNode;
+               document.getElementsByName('data[tx_beacl_acl][' + id + '][type]')[0].parentNode.parentNode.parentNode.removeChild(deleteLine);
+               var deleteLine2 = document.getElementsByName('data[tx_beacl_acl][' + id + '][permissions]')[0];
+               document.getElementsByName('data[tx_beacl_acl][' + id + '][permissions]')[0].parentNode.removeChild(deleteLine2);
+               var deleteLine3 = document.getElementsByName('data[tx_beacl_acl][' + id + '][pid]')[0];
+               document.getElementsByName('data[tx_beacl_acl][' + id + '][pid]')[0].parentNode.removeChild(deleteLine3);
+       } else {
+                       // delete by filling the cmdMap
+               var hiddenFields = document.getElementById('insertHiddenFields');
+               var hiddenDeleteCMDmap = document.createElement('input');
+               hiddenDeleteCMDmap.setAttribute('type', 'hidden');
+               hiddenDeleteCMDmap.setAttribute('name', 'cmd[tx_beacl_acl][' + id + '][delete]');
+               hiddenDeleteCMDmap.setAttribute('value', 1);
+               hiddenFields.appendChild(hiddenDeleteCMDmap);
+
+               document.editform.submit.click();
+       }
+}
+
+/**
+ * update user and group information
+ *
+ * @param ID of ACL
+ * @param selected entry
+ */
+function updateUserGroup (ACLid,selectedEntry) {
+       var pageID = document.getElementsByName('pageID')[0].value;
+       var typeSelector = document.getElementsByName('data[tx_beacl_acl][' + ACLid + '][type]')[0];
+
+       // get child nodes of user/group selector
+       if(typeSelector.value == 0) {
+               // USER
+               var childNodes = document.getElementsByName('data[pages]['+pageID+'][perms_userid]')[0].childNodes;
+       } else {
+               var childNodes = document.getElementsByName('data[pages]['+pageID+'][perms_groupid]')[0].childNodes;
+       }
+
+       // delete current nodes
+       var objId = document.getElementsByName('data[tx_beacl_acl][' + ACLid + '][object_id]')[0];
+       var length = objId.childNodes.length;
+       for(var i=0; i < length;i++) {
+               objId.removeChild(objId.firstChild);
+       }
+
+       // set new nodes
+       for(var i=0;i<childNodes.length;i++) {
+               var tmp = childNodes[i].cloneNode(true);
+               document.getElementsByName('data[tx_beacl_acl][' + ACLid + '][object_id]')[0].appendChild(tmp);
+       }
+
+       if(arguments.length == 2) {
+               document.getElementsByName('data[tx_beacl_acl][' + ACLid + '][object_id]')[0].value = selectedEntry;
+       }
+}
+
+/**
+ * create new ACL ID
+ */
+function getNewID () {
+               // CREATE ID for new ACL
+       var rand = Math.random()*10000000;
+       rand = Math.round(rand);
+       var ACLid = 'NEW' + rand;
+       return ACLid;
+}
+
+/**
+ * add ACL
+ */
+function addACL () {
+               // CREATE ID for new ACL
+       var ACLid = getNewID();
+               // save ACL ID in the new ACLs array
+       global_newACLs[global_newACLs.length] = ACLid;
+
+
+       var tableRow = document.createElement("tr");
+
+       var tableCells = Array(8);
+       var variousObjects = Array();
+       var selectorBoxes = Array(6);
+
+               // first table cell with selectors
+       tableCells[0] = document.createElement("td");
+       tableCells[0].className = 'bgColor2';
+       tableCells[0].align = 'right';
+
+               if (navigator.appName.indexOf("Explorer") != -1)        {
+                       variousObjects[1] = document.createElement('<select name="data[tx_beacl_acl][' + ACLid + '][type]">');
+
+               } else {
+                       variousObjects[1] = document.createElement('select');
+                       variousObjects[1].setAttribute("name", 'data[tx_beacl_acl][' + ACLid + '][type]');
+               }
+               variousObjects[1].onchange = function() { updateUserGroup(ACLid) };
+
+                       variousObjects[11] = document.createElement('option');
+                       variousObjects[11].value = 1;
+                               variousObjects[111] = document.createTextNode('Group');
+                               variousObjects[11].appendChild(variousObjects[111]);
+                       variousObjects[12] = document.createElement('option');
+                       variousObjects[12].value = 0;
+                               variousObjects[121] = document.createTextNode('User');
+                               variousObjects[12].appendChild(variousObjects[121]);
+                       variousObjects[1].appendChild(variousObjects[11]);
+                       variousObjects[1].appendChild(variousObjects[12]);
+
+               if (navigator.appName.indexOf("Explorer") != -1)        {
+                       variousObjects[2] = document.createElement('<select name="data[tx_beacl_acl][' + ACLid + '][object_id]">');
+               } else {
+                       variousObjects[2] = document.createElement('select');
+                       variousObjects[2].setAttribute("name", 'data[tx_beacl_acl][' + ACLid + '][object_id]');
+               }
+       tableCells[0].appendChild(variousObjects[1]);
+       tableCells[0].appendChild(variousObjects[2]);
+       tableRow.appendChild(tableCells[0]);
+
+
+               // permission table cells
+       for(var i = 1; i <= 6;i++) {
+               tableCells[i] = document.createElement("td");
+               tableCells[i].className = 'bgColor-20';
+               var id = 0;
+               switch(i) {
+                       case 1: id = 1; break;
+                       case 2: id = 5; break;
+                       case 3: id = 2; break;
+                       case 4: id = 3; break;
+                       case 5: id = 4; break;
+
+                       case 6:
+                               if (navigator.appName.indexOf("Explorer") != -1)        {
+                                       selectorBoxes[i-1] = document.createElement('<input name="data[tx_beacl_acl][' +  ACLid + '][recursive]">');
+                               } else {
+                                       selectorBoxes[i-1] = document.createElement('input');
+                                       selectorBoxes[i-1].setAttribute("name", 'data[tx_beacl_acl][' +  ACLid + '][recursive]');
+                               }
+                               selectorBoxes[i-1].setAttribute("type", 'checkbox');
+                               selectorBoxes[i-1].value = 1;
+                               tableCells[i].appendChild(selectorBoxes[i-1]);
+                               break;
+               }
+               if(id != 0) {
+                       if (navigator.appName.indexOf("Explorer") != -1)        {
+                               selectorBoxes[i-1] = document.createElement('<input name="check[perms_acl_' +  ACLid + ']['+id+']">');
+                       } else {
+                               selectorBoxes[i-1] = document.createElement('input');
+                               selectorBoxes[i-1].setAttribute("name", 'check[perms_acl_' +  ACLid + ']['+id+']');
+                       }
+                       selectorBoxes[i-1].setAttribute("type", 'checkbox');
+                       selectorBoxes[i-1].onclick = function() { checkChange('check[perms_acl_'+ACLid+']', 'data[tx_beacl_acl]['+ACLid+'][permissions]') };
+                       tableCells[i].appendChild(selectorBoxes[i-1]);
+               }
+               tableRow.appendChild(tableCells[i]);
+       }
+
+               // delete ACL link
+       variousObjects[31] = document.getElementById("templateDeleteImage").cloneNode(true);
+       variousObjects[31].style.display = 'inline';
+       variousObjects[30] = document.createElement('a');
+       variousObjects[30].href = 'javascript:deleteACL("'+ACLid+'")';
+       variousObjects[30].onclick = function() { deleteACL(ACLid) };
+       variousObjects[30].appendChild(variousObjects[31]);
+
+       tableCells[7] = document.createElement("td");
+       tableCells[7].appendChild(variousObjects[30]);
+       tableRow.appendChild(tableCells[7]);
+
+               // append line to table
+       document.getElementById('typo3-permissionMatrix').firstChild.appendChild(tableRow);
+
+               // hidden fields
+       var hiddenFields = document.getElementById('insertHiddenFields');
+       if (navigator.appName.indexOf("Explorer") != -1)        {
+               var hiddenACLstore = document.createElement('<input name="data[tx_beacl_acl][' + ACLid + '][permissions]">');
+       } else {
+               var hiddenACLstore = document.createElement('input');
+               hiddenACLstore.name = 'data[tx_beacl_acl][' + ACLid + '][permissions]';
+       }
+       hiddenACLstore.setAttribute('type', 'hidden');
+       hiddenACLstore.setAttribute('value', 0);
+
+       hiddenFields.appendChild(hiddenACLstore);
+
+       if (navigator.appName.indexOf("Explorer") != -1)        {
+               var hiddenPIDstore = document.createElement('<input name="data[tx_beacl_acl][' + ACLid + '][pid]">');
+       } else {
+               var hiddenPIDstore = document.createElement('input');
+               hiddenPIDstore.setAttribute('name', 'data[tx_beacl_acl][' + ACLid + '][pid]');
+       }
+       hiddenPIDstore.setAttribute('type', 'hidden');
+       hiddenPIDstore.setAttribute('value', document.getElementsByName('pageID')[0].value);
+
+       hiddenFields.appendChild(hiddenPIDstore);
+
+               // update user and groups for new ACLs
+       updateUserGroup(ACLid);
+}
\ No newline at end of file
diff --git a/res/class.tx_beacl_userauthgroup.php b/res/class.tx_beacl_userauthgroup.php
new file mode 100644 (file)
index 0000000..94b0b4a
--- /dev/null
@@ -0,0 +1,230 @@
+<?php
+
+
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2005 Sebastian Kurfuerst (sebastian@garbage-group.de)
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * Backend ACL - Functions re-calculating permissions
+ *
+ * @author  Sebastian Kurfuerst <sebastian@typo3.org>
+ */
+
+class tx_beacl_userAuthGroup {
+
+       /**
+        * Returns a combined binary representation of the current users permissions for the page-record, $row.
+        * The perms for user, group and everybody is OR'ed together (provided that the page-owner is the user and for the groups that the user is a member of the group
+        * If the user is admin, 31 is returned (full permissions for all five flags)
+        *
+        * @param       array           Input page row with all perms_* fields available.
+        * @param       object          BE User Object
+        * @return      integer         Bitwise representation of the users permissions in relation to input page row, $row
+        */
+       public function calcPerms($params, $that)       {
+               $row = $params['row'];
+
+               $beAclConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['be_acl']);
+               if(!$beAclConfig['disableOldPermissionSystem']) {
+                       $out = $params['outputPermissions'];
+               } else {
+                       $out = 0;
+               }
+
+               $rootLine = t3lib_BEfunc::BEgetRootLine($row['uid']);
+
+               $i = 0;
+               $takeUserIntoAccount = 1;
+               $groupIdsAlreadyUsed = Array();
+               foreach($rootLine as $level => $values) {
+                       if($i != 0) {
+                               $recursive = ' AND recursive=1';
+                       } else {
+                               $recursive = '';
+                       }
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_beacl_acl', 'pid='.intval($values['uid']).$recursive, '', 'recursive ASC');
+
+                       while ($result = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                               if ($result['type'] == 0
+                                       && ($that->user['uid'] == $result['object_id'])
+                                       && $takeUserIntoAccount) { // user has to be taken into account
+                                       $out|=$result['permissions'];
+                                       $takeUserIntoAccount = 0;
+
+                               } elseif ($result['type'] == 1
+                                       && $that->isMemberOfGroup($result['object_id'])
+                                       && !in_array($result['object_id'], $groupIdsAlreadyUsed)) {
+                                       $out|=$result['permissions'];
+                                       $groupIdsAlreadyUsed[] = $result['object_id'];
+                               }
+                       }
+                       $i++;
+               }
+               
+               return $out;
+       }
+
+       /**
+        * Returns a WHERE-clause for the pages-table where user permissions according to input argument, $perms, is validated.
+        * $perms is the 'mask' used to select. Fx. if $perms is 1 then you'll get all pages that a user can actually see!
+        *              2^0 = show (1)
+        *              2^1 = edit (2)
+        *              2^2 = delete (4)
+        *              2^3 = new (8)
+        * If the user is 'admin' " 1=1" is returned (no effect)
+        * If the user is not set at all (->user is not an array), then " 1=0" is returned (will cause no selection results at all)
+        * The 95% use of this function is "->getPagePermsClause(1)" which will return WHERE clauses for *selecting* pages in backend listings - in other words will this check read permissions.
+        *
+        * @param       integer         Permission mask to use, see function description
+        * @param       object          BE User Object
+        * @return      string          Part of where clause. Prefix " AND " to this.
+        */
+
+       function getPagePermsClause($params, $that)     {
+       
+                       // Load cache from BE User data
+               $cache = $GLOBALS['BE_USER']->getSessionData('be_acl');
+               if (!$cache)    $cache = array();
+               
+                       // Check if we can return something from cache
+               if (is_array($cache[$that->user['uid']])
+                       && $cache[$that->user['uid']][$params['perms']]) {
+                       return $cache[$that->user['uid']][$params['perms']];
+               }
+               
+                       // get be_acl config in EM
+               $beAclConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['be_acl']);
+               if(!$beAclConfig['disableOldPermissionSystem']) {
+                       $str = $params['currentClause'];
+               } else {
+                       $str = '1 = 2';
+               }
+                       // get some basic variables
+               $perms = $params['perms'];
+               $this->aclPageList = Array();
+
+                       // get allowed IDs for user
+               $this->getPagePermsClause_single(0, $that->user['uid'], $perms);
+                       // get allowed IDs for every single group
+               if($that->groupList) {
+                       $groupList = explode(',',$that->groupList);
+                       foreach($groupList as $singleGroup) {
+                               $this->getPagePermsClause_single(1, $singleGroup, $perms);
+                       }
+               }
+               if(!empty($this->aclPageList)) {
+                               // put all page IDs together to the final SQL string
+                       $str = '( '.$str.' ) OR ( pages.uid IN ('.implode(',',$this->aclPageList).') )';
+
+                               // if the user is in a workspace, that has to be taken into account
+                               // see t3lib_BEfunc::getWorkspaceVersionOfRecord() for the source of this query
+                       if ($that->workspace)   {
+                               $str .= ' OR ( pages.t3ver_wsid='.intval($that->workspace).' AND pages.t3ver_oid IN ('.implode(',',$this->aclPageList).') )';
+                       }
+               }
+
+                       // for safety, put whole where query part into brackets so it won't interfere with other parts of the page
+               $str = ' ( '.$str.' ) ';
+               
+                       // Store data in cache
+               $cache[$that->user['uid']][$params['perms']] = $str;
+               $GLOBALS['BE_USER']->setAndSaveSessionData('be_acl', $cache);
+               return $str;
+       }
+
+       /**
+        * adds allowed pages to $this->aclPageList for a certain user/group
+        *
+        * most of the code found here was before in getPagePermsClause of be_acl
+        *
+        * @param $type int  Type of the ACL record (0 - User, 1 - Group)
+        * @param $object_id int  ID of the group / user
+        * @param $perms int  permission mask to use
+        * @return nothing, fills $this->aclPageList
+        **/
+       protected function getPagePermsClause_single($type, $object_id, $perms) {
+                       // reset aclDisallowed
+               $this->aclDisallowed = Array();
+                       // 1. fetch all ACLs relevant for the current user/group
+               $aclAllowed = Array();
+               $where = ' ( (type = '.intval($type).' AND object_id = '.intval($object_id).')';
+
+               $whereAllow = ') AND (permissions & '.$perms.' = '.$perms.')';
+               $whereDeny = ') AND (permissions & '.$perms.' = 0)';
+
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                       'pid, recursive',
+                       'tx_beacl_acl',
+                       $where.$whereAllow
+               );
+               while($result = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                       $aclAllowed[] = $result;
+               }
+
+               if($aclAllowed) {
+                               // get all "deny" acls if there are allow ACLs
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                               'pid, recursive',
+                               'tx_beacl_acl',
+                               $where.$whereDeny
+                       );
+                       while($result = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                               $this->aclDisallowed[$result['pid']] = $result['recursive']; // only one ACL per group/user per page is allowed, that's why this line imposes no problem. It rather increases speed.
+                       }
+
+                       // go through all allowed ACLs, if it is not recursive, add the page to the aclPageList, if recursive, call recursion function
+                       foreach($aclAllowed as $singleAllow) {
+                               if($singleAllow['recursive'] == 0) {
+                                       $this->aclPageList[$singleAllow['pid']] = $singleAllow['pid'];
+                               } else {
+                                       $this->aclTraversePageTree($singleAllow['pid']);
+                               }
+                       } // foreach
+               } // if($aclAllowed)
+       } // function getPagePermsClause_single
+
+       /**
+        * traverses page tree and handles "disallow" ACLs
+        *
+        * is a recursive function.
+        * @param $pid int  Page ID where to start traversing the tree
+        * @return nothing, fills $this->aclPageList
+        **/
+       protected function aclTraversePageTree($pid) {
+                       // if there is a disallow ACL for the current page, don't add the page to the aclPageList
+               if(array_key_exists($pid, $this->aclDisallowed)) {
+                       if($this->aclDisallowed[$pid] == 1) {
+                               return 0; // if recursive, stop processing
+                       }
+               } else { // in case there is no disallow ACL, add page ID to aclPageList
+                       $this->aclPageList[$pid] = $pid;
+               }
+
+                       // find subpages and call function itself again
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid','pages', 'pid='.intval($pid).' AND deleted=0');
+               while($result = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                       $this->aclTraversePageTree($result['uid']);
+               }
+       }
+}
+
+?>
diff --git a/res/class.ux_sc_mod_web_perm_index.php b/res/class.ux_sc_mod_web_perm_index.php
new file mode 100644 (file)
index 0000000..92cc765
--- /dev/null
@@ -0,0 +1,766 @@
+<?php
+
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2005 Sebastian Kurfuerst (sebastian@garbage-group.de)
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * Backend ACL - Replacement for "web->Access"
+ *
+ * @author  Sebastian Kurfuerst <sebastian@garbage-group.de>
+ */
+
+class ux_SC_mod_web_perm_index extends SC_mod_web_perm_index {
+
+
+
+       /*****************************
+        *
+        * Listing and Form rendering
+        *
+        *****************************/
+
+       /**
+        * Showing the permissions in a tree ($this->edit = false)
+        * (Adding content to internal content variable)
+        *
+        * @return      void
+        */
+       function notEdit()      {
+               global $BE_USER,$LANG,$BACK_PATH;
+
+               // get ACL configuration
+               $beAclConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['be_acl']);
+               if ($beAclConfig['disableOldPermissionSystem']) {
+                       $disableOldPermissionSystem = 1;
+               } else {
+                       $disableOldPermissionSystem = 0;
+               }
+
+               $LANG->includeLLFile('EXT:be_acl/res/locallang_perm.php');
+                       // Get usernames and groupnames: The arrays we get in return contains only 1) users which are members of the groups of the current user, 2) groups that the current user is member of
+               $groupArray = $BE_USER->userGroupsUID;
+               $be_user_Array = t3lib_BEfunc::getUserNames();
+               if (!$GLOBALS['BE_USER']->isAdmin())            $be_user_Array = t3lib_BEfunc::blindUserNames($be_user_Array,$groupArray,0);
+               $be_group_Array = t3lib_BEfunc::getGroupNames();
+               if (!$GLOBALS['BE_USER']->isAdmin())            $be_group_Array = t3lib_BEfunc::blindGroupNames($be_group_Array,$groupArray,0);
+
+                       // Length of strings:
+               $tLen= ($this->MOD_SETTINGS['mode']=='perms' ? 20 : 30);
+
+                       // Selector for depth:
+               $code.=$LANG->getLL('Depth').': ';
+               $code.=t3lib_BEfunc::getFuncMenu($this->id,'SET[depth]',$this->MOD_SETTINGS['depth'],$this->MOD_MENU['depth']);
+               $this->content.=$this->doc->section('',$code);
+               $this->content.=$this->doc->spacer(5);
+
+                       // Initialize tree object:
+               $tree = t3lib_div::makeInstance('t3lib_pageTree');
+               $tree->init('AND '.$this->perms_clause);
+
+               $tree->addField('perms_user',1);
+               $tree->addField('perms_group',1);
+               $tree->addField('perms_everybody',1);
+               $tree->addField('perms_userid',1);
+               $tree->addField('perms_groupid',1);
+               $tree->addField('hidden');
+               $tree->addField('fe_group');
+               $tree->addField('starttime');
+               $tree->addField('endtime');
+               $tree->addField('editlock');
+
+                       // Creating top icon; the current page
+               $HTML=t3lib_iconWorks::getIconImage('pages',$this->pageinfo,$BACK_PATH,'align="top"');
+               $tree->tree[]=Array('row'=>$this->pageinfo,'HTML'=>$HTML);
+
+                       // Create the tree from $this->id:
+               $tree->getTree($this->id,$this->MOD_SETTINGS['depth'],'');
+
+                       // get list of ACL users and groups, and initialize ACLs
+               $aclUsers = $this->acl_objectSelector(0, $displayUserSelector, $beAclConfig);
+               $aclGroups = $this->acl_objectSelector(1, $displayGroupSelector, $beAclConfig);
+
+               $this->buildACLtree($aclUsers, $aclGroups);
+
+               $this->content.=$displayUserSelector;
+               $this->content.=$displayGroupSelector;
+
+
+                       // Make header of table:
+               $code='';
+
+               if ($this->MOD_SETTINGS['mode']=='perms')       {
+                       $code.='
+                               <tr>
+                                       <td class="bgColor2" colspan="2">&nbsp;</td>';
+                       $code.='
+                                       <td class="bgColor2"><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/line.gif','width="5" height="16"').' alt="" /></td>';
+                       $tableCells = Array();
+                       if(!$disableOldPermissionSystem) {
+                               $tableCells[] = '<b>'.$LANG->getLL('Owner',1).'</b>';
+                               $tableCells[] = '<b>'.$LANG->getLL('Group',1).'</b>';
+                               $tableCells[] = '<b>'.$LANG->getLL('Everybody',1).'</b>';
+                       }
+                       // $tableCells[] = '<b>'.$LANG->getLL('EditLock',1).'</b>'; // TODO: Editlock
+
+                               // ACL headers
+                       if(!empty($aclUsers)) {
+                               $tableCells[] = '<b>'.$GLOBALS['LANG']->getLL('aclUser').'</b>';
+                               foreach($aclUsers as $uid) {
+                                       $tableCells[] = $be_user_Array[$uid]['username'];
+                               }
+                       }
+                       if(!empty($aclGroups)) {
+                               $tableCells[] = '<b>'.$GLOBALS['LANG']->getLL('aclGroup').'</b>';
+                               foreach($aclGroups as $uid) {
+                                       $tableCells[] = $be_group_Array[$uid]['title'];
+                               }
+                       }
+                       $code.=$this->printTableHeader($tableCells);
+                       $code .='</tr>';
+               } else {
+                       $code.='
+                               <tr>
+                                       <td class="bgColor2" colspan="2">&nbsp;</td>
+                                       <td class="bgColor2"><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/line.gif','width="5" height="16"').' alt="" /></td>
+                                       <td class="bgColor2" align="center" nowrap="nowrap"><b>'.$LANG->getLL('User',1).':</b> '.$BE_USER->user['username'].'</td>
+                                       '.(!$BE_USER->isAdmin()?'<td class="bgColor2"><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/line.gif','width="5" height="16"').' alt="" /></td>
+                                       <td class="bgColor2" align="center"><b>'.$LANG->getLL('EditLock',1).'</b></td>':'').'
+                               </tr>';
+               }
+
+                       // Traverse tree:
+               foreach($tree->tree as $data)   {
+                       $cells = array();
+
+                               // Background colors:
+                       //if ($this->lastEdited==$data['row']['uid'])   {$bgCol = ' class="bgColor-20"';} else {$bgCol = '';}
+
+                       $bgCol = '';
+
+                       $lE_bgCol = $bgCol;
+
+                               // User/Group names:
+                       $userN = $be_user_Array[$data['row']['perms_userid']] ? $be_user_Array[$data['row']['perms_userid']]['username'] : ($data['row']['perms_userid'] ? '<i>['.$data['row']['perms_userid'].']!</i>' : '');
+                       $groupN = $be_group_Array[$data['row']['perms_groupid']] ? $be_group_Array[$data['row']['perms_groupid']]['title']  : ($data['row']['perms_groupid'] ? '<i>['.$data['row']['perms_groupid'].']!</i>' : '');
+                       $groupN = t3lib_div::fixed_lgd_cs($groupN,20);
+
+                               // Seeing if editing of permissions are allowed for that page:
+                       $editPermsAllowed=($data['row']['perms_userid']==$BE_USER->user['uid'] || $BE_USER->isAdmin());
+
+                               // First column:
+                       $cells[]='
+                                       <td align="left" nowrap="nowrap"'.$bgCol.$this->generateTitleAttribute($data['row']['uid'],$be_user_Array, $be_group_Array).'>'.$data['HTML'].htmlspecialchars(t3lib_div::fixed_lgd($data['row']['title'],$tLen)).'&nbsp;</td>';
+
+                               // "Edit permissions" -icon
+                       if ($editPermsAllowed && $data['row']['uid'])   {
+                               $aHref = 'index.php?mode='.$this->MOD_SETTINGS['mode'].'&depth='.$this->MOD_SETTINGS['depth'].'&id='.$data['row']['uid'].'&return_id='.$this->id.'&edit=1';
+                               $cells[]='
+                                       <td'.$bgCol.'><a href="'.htmlspecialchars($aHref).'"><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/edit2.gif','width="11" height="12"').' border="0" title="'.$LANG->getLL('ch_permissions',1).'" align="top" alt="" /></a></td>';
+                       } else {
+                               $cells[]='
+                                       <td'.$bgCol.'></td>';
+                       }
+
+                               // Rest of columns (depending on mode)
+                       if ($this->MOD_SETTINGS['mode']=='perms')       {
+                               if(!$disableOldPermissionSystem) {
+                                       $cells[]='
+                                               <td'.$bgCol.'><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/line.gif','width="5" height="16"').' alt="" /></td>
+                                               <td'.$bgCol.' nowrap="nowrap">'.($data['row']['uid']?$this->printPerms($data['row']['perms_user']).' '.$userN:'').'</td>
+
+                                               <td'.$bgCol.'><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/line.gif','width="5" height="16"').' alt="" /></td>
+                                               <td'.$bgCol.' nowrap="nowrap">'.($data['row']['uid']?$this->printPerms($data['row']['perms_group']).' '.$groupN:'').'</td>
+
+                                               <td'.$bgCol.'><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/line.gif','width="5" height="16"').' alt="" /></td>
+                                               <td'.$bgCol.' nowrap="nowrap">'.($data['row']['uid']?' '.$this->printPerms($data['row']['perms_everybody']):'').'</td>';
+                               }
+
+                               /*$cells[] ='
+                                       <td'.$bgCol.'><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/line.gif','width="5" height="16"').' alt="" /></td>
+                                       <td'.$bgCol.' nowrap="nowrap">'.($data['row']['editlock']?'<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/recordlock_warning2.gif','width="22" height="16"').' title="'.$LANG->getLL('EditLock_descr',1).'" alt="" />':'').'</td>
+                               ';*/ // TODO: Editlock
+
+                                       // ACL rows
+                               if(!empty($aclUsers)) {
+                                       $cells[] = '<td'.$bgCol.'><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/line.gif','width="5" height="16"').' alt="" /></td><td'.$bgCol.'>'.$this->countAcls($this->aclList[$data['row']['uid']][0]).'</td>';
+                                       foreach($aclUsers as $uid) {
+                                               $tmpBg = $bgCol;
+                                               if (isset($this->aclList[$data['row']['uid']][0][$uid]['newAcl']))      {
+                                                       if ($this->aclList[$data['row']['uid']][0][$uid]['recursive'])  {
+                                                               $tmpBg = ' class="bgColor5"';
+                                                       } else {
+                                                               $tmpBg = ' class="bgColor6"';
+                                                       }
+                                               }
+
+                                               $cells[] = '<td'.$bgCol.'><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/line.gif','width="5" height="16"').' alt="" /></td>
+                                               <td'.$tmpBg.' nowrap="nowrap">'.($data['row']['uid']?' '.$this->printPerms($this->aclList[$data['row']['uid']][0][$uid]['permissions']):'').'</td>';
+                                       }
+                               }
+                               if(!empty($aclGroups)) {
+                                       $cells[] = '<td'.$bgCol.'><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/line.gif','width="5" height="16"').' alt="" /></td><td'.$bgCol.'>'.$this->countAcls($this->aclList[$data['row']['uid']][1]).'</td>';
+                                       foreach($aclGroups as $uid) {
+                                               $tmpBg = $bgCol;
+                                               if (isset($this->aclList[$data['row']['uid']][1][$uid]['newAcl']))      {
+                                                       if ($this->aclList[$data['row']['uid']][1][$uid]['recursive'])  {
+                                                               $tmpBg = ' class="bgColor5"';
+                                                       } else {
+                                                               $tmpBg = ' class="bgColor6"';
+                                                       }
+                                               }
+                                               $cells[] = '<td'.$bgCol.'><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/line.gif','width="5" height="16"').' alt="" /></td>
+                                               <td'.$tmpBg.' nowrap="nowrap">'.($data['row']['uid']?' '.$this->printPerms($this->aclList[$data['row']['uid']][1][$uid]['permissions']):'').'</td>';
+                                       }
+                               }
+
+                       } else {
+                               $cells[]='
+                                       <td'.$bgCol.'><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/line.gif','width="5" height="16"').' alt="" /></td>';
+
+                               if ($BE_USER->user['uid']==$data['row']['perms_userid'])        {$bgCol = ' class="bgColor-20"';} else {$bgCol = $lE_bgCol;}
+                               $cells[]='
+                                       <td'.$bgCol.' nowrap="nowrap" align="center">'.($data['row']['uid']?$owner.$this->printPerms($BE_USER->calcPerms($data['row'])):'').'</td>
+                                       '.(!$BE_USER->isAdmin()?'
+                                       <td'.$bgCol.'><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/line.gif','width="5" height="16"').' alt="" /></td>
+                                       <td'.$bgCol.' nowrap="nowrap">'.($data['row']['editlock']?'<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/recordlock_warning2.gif','width="22" height="16"').' title="'.$LANG->getLL('EditLock_descr',1).'" alt="" />':'').'</td>
+                                       ':'');
+                               $bgCol = $lE_bgCol;
+                       }
+
+                               // Compile table row:
+                       $code.='
+                               <tr>
+                                       '.implode('
+                                       ',$cells).'
+                               </tr>';
+               }
+
+                       // Wrap rows in table tags:
+               $code='<table border="0" cellspacing="0" cellpadding="0" id="typo3-permissionList">'.$code.'</table>';
+
+                       // Adding the content as a section:
+               $this->content.=$this->doc->section('',$code);
+
+                       // CSH for permissions setting
+               $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'perm_module', $GLOBALS['BACK_PATH'],'<br/>|');
+
+                       // Creating legend table:
+               $legendText = '<b>'.$LANG->getLL('1',1).'</b>: '.$LANG->getLL('1_t',1);
+               $legendText.= '<br /><b>'.$LANG->getLL('16',1).'</b>: '.$LANG->getLL('16_t',1);
+               $legendText.= '<br /><b>'.$LANG->getLL('2',1).'</b>: '.$LANG->getLL('2_t',1);
+               $legendText.= '<br /><b>'.$LANG->getLL('4',1).'</b>: '.$LANG->getLL('4_t',1);
+               $legendText.= '<br /><b>'.$LANG->getLL('8',1).'</b>: '.$LANG->getLL('8_t',1);
+
+               $code='<table border="0" id="typo3-legendTable">
+                       <tr>
+                               <td valign="top"><img src="legend.gif" width="86" height="75" alt="" /></td>
+                               <td valign="top" nowrap="nowrap">'.$legendText.'</td>
+                       </tr>
+               </table>';
+               $code.='<br />'.$LANG->getLL('def',1);
+               $code.='<br /><br /><span class="perm-allowed">*</span>: '.$LANG->getLL('A_Granted',1);
+               $code.='<br /><span class="perm-denied">x</span>: '.$LANG->getLL('A_Denied',1);
+
+                       // Adding section with legend code:
+               $this->content.=$this->doc->spacer(20);
+               $this->content.=$this->doc->section($LANG->getLL('Legend').':',$code,0,1);
+       }
+
+       /**
+        * Creating form for editing the permissions    ($this->edit = true)
+        * (Adding content to internal content variable)
+        *
+        * @return      void
+        */
+       function doEdit()       {
+               global $BE_USER,$LANG;
+
+                       // get ACL configuration
+               $beAclConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['be_acl']);
+               if($beAclConfig['disableOldPermissionSystem']) {
+                       $disableOldPermissionSystem = 1;
+               } else {
+                       $disableOldPermissionSystem = 0;
+               }
+
+               $LANG->includeLLFile('EXT:be_acl/res/locallang_perm.php');
+
+                       // Get usernames and groupnames
+               $be_group_Array=t3lib_BEfunc::getListGroupNames('title,uid');
+               $groupArray=array_keys($be_group_Array);
+
+               $be_user_Array = t3lib_BEfunc::getUserNames();
+               if (!$GLOBALS['BE_USER']->isAdmin())            $be_user_Array = t3lib_BEfunc::blindUserNames($be_user_Array,$groupArray,1);
+               $be_group_Array_o = $be_group_Array = t3lib_BEfunc::getGroupNames();
+               if (!$GLOBALS['BE_USER']->isAdmin())            $be_group_Array = t3lib_BEfunc::blindGroupNames($be_group_Array_o,$groupArray,1);
+               $firstGroup = $groupArray[0] ? $be_group_Array[$groupArray[0]] : '';    // data of the first group, the user is member of
+
+
+                       // set JavaScript
+               $subPagesData = '';
+                       // generate list if record is available on subpages, if yes, enter the id
+               $this->content .= '<script src="../../../'.t3lib_extMgm::extRelPath('be_acl').'res/acl.js" type="text/javascript">
+                       '.$subPagesData.'
+               </script>';
+
+                       // Owner selector:
+               $options='';
+               $userset=0;     // flag: is set if the page-userid equals one from the user-list
+               foreach($be_user_Array as $uid => $row) {
+                       if ($uid==$this->pageinfo['perms_userid'])      {
+                               $userset = 1;
+                               $selected=' selected="selected"';
+                       } else {$selected='';}
+                       $options.='
+                               <option value="'.$uid.'"'.$selected.'>'.htmlspecialchars($row['username']).'</option>';
+               }
+               $options='
+                               <option value="0"></option>'.$options;
+
+
+                       // hide selector if not needed
+               if($disableOldPermissionSystem) {
+                       $hidden = ' style="display:none;" ';
+               } else {
+                       $hidden = '';
+               }
+               $selector='
+                       <select name="data[pages]['.$this->id.'][perms_userid]" '.$hidden.'>
+                               '.$options.'
+                       </select>';
+
+               if ($disableOldPermissionSystem)        {
+                       $this->content.= $selector;
+               } else {
+                       $this->content.=$this->doc->section($LANG->getLL('Owner').':',$selector);
+               }
+
+                       // Group selector:
+               $options='';
+               $userset=0;
+               foreach($be_group_Array as $uid => $row)        {
+                       if ($uid==$this->pageinfo['perms_groupid'])     {
+                               $userset = 1;
+                               $selected=' selected="selected"';
+                       } else {$selected='';}
+                       $options.='
+                               <option value="'.$uid.'"'.$selected.'>'.htmlspecialchars($row['title']).'</option>';
+               }
+               if (!$userset && $this->pageinfo['perms_groupid'])      {       // If the group was not set AND there is a group for the page
+                       $options='
+                               <option value="'.$this->pageinfo['perms_groupid'].'" selected="selected">'.
+                                               htmlspecialchars($be_group_Array_o[$this->pageinfo['perms_groupid']]['title']).
+                                               '</option>'.
+                                               $options;
+               }
+               $options='
+                               <option value="0"></option>'.$options;
+               $selector='
+                       <select name="data[pages]['.$this->id.'][perms_groupid]"  '.$hidden.'>
+                               '.$options.'
+                       </select>';
+
+               if ($disableOldPermissionSystem)        {
+                       $this->content.= $selector;
+               } else {
+                       $this->content.=$this->doc->divider(5);
+                       $this->content.=$this->doc->section($LANG->getLL('Group').':',$selector);
+               }
+                       // Permissions checkbox matrix:
+               $code='
+               <input type="hidden" name="pageID" value="'.$this->id.'" />
+                       <table border="0" cellspacing="2" cellpadding="0" id="typo3-permissionMatrix"><tbody>
+                               <tr>
+                                       <td></td>
+                                       <td class="bgColor2">'.str_replace(' ','<br />',$LANG->getLL('1',1)).'</td>
+                                       <td class="bgColor2">'.str_replace(' ','<br />',$LANG->getLL('16',1)).'</td>
+                                       <td class="bgColor2">'.str_replace(' ','<br />',$LANG->getLL('2',1)).'</td>
+                                       <td class="bgColor2">'.str_replace(' ','<br />',$LANG->getLL('4',1)).'</td>
+                                       <td class="bgColor2">'.str_replace(' ','<br />',$LANG->getLL('8',1)).'</td>
+                                       <td class="bgColor2">'.str_replace(' ','<br />',$LANG->getLL('recursiveAcl',1)).'</td>
+                                       <td></td>
+                               </tr>';
+               if(!$disableOldPermissionSystem) {
+                       $code .= '
+                               <tr>
+                                       <td align="right" class="bgColor2">'.$LANG->getLL('Owner',1).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_user',1).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_user',5).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_user',2).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_user',3).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_user',4).'</td>
+                                       <td class="bgColor-20"></td>
+                                       <td></td>
+                               </tr>
+                               <tr>
+                                       <td align="right" class="bgColor2">'.$LANG->getLL('Group',1).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_group',1).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_group',5).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_group',2).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_group',3).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_group',4).'</td>
+                                       <td class="bgColor-20"></td>
+                                       <td></td>
+                               </tr>
+                               <tr>
+                                       <td align="right" class="bgColor2">'.$LANG->getLL('Everybody',1).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_everybody',1).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_everybody',5).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_everybody',2).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_everybody',3).'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_everybody',4).'</td>
+                                       <td class="bgColor-20"></td>
+                                       <td></td>
+                               </tr>';
+               }
+                       // ACL CODE
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_beacl_acl', 'pid='.intval($this->id));
+               while($result = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                       $acl_prefix = 'data[tx_beacl_acl]['.$result['uid'].']';
+                       $code .= '<tr>
+                                       <td align="right" class="bgColor2"><select name="'.$acl_prefix.'[type]" onChange="updateUserGroup('.$result['uid'].')"><option value="0" '.($result['type']?'':'selected="selected"').'>User</option><option value="1" '.($result['type']?'selected="selected"':'').'>Group</option></select><select name="'.$acl_prefix.'[object_id]"></select></td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_acl_'.$result['uid'],1, 'data[tx_beacl_acl]['.$result['uid'].'][permissions]').'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_acl_'.$result['uid'],5, 'data[tx_beacl_acl]['.$result['uid'].'][permissions]').'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_acl_'.$result['uid'],2, 'data[tx_beacl_acl]['.$result['uid'].'][permissions]').'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_acl_'.$result['uid'],3, 'data[tx_beacl_acl]['.$result['uid'].'][permissions]').'</td>
+                                       <td class="bgColor-20">'.$this->printCheckBox('perms_acl_'.$result['uid'],4, 'data[tx_beacl_acl]['.$result['uid'].'][permissions]').'
+                                               <input type="hidden" name="'.$acl_prefix.'[permissions]" value="'.$result['permissions'].'" />
+
+                                               <script type="text/javascript">updateUserGroup('.$result['uid'].', '.$result['object_id'].');
+                                               setCheck("check[perms_acl_'.$result['uid'].']","data[tx_beacl_acl]['.$result['uid'].'][permissions]");
+                                               global_currentACLs[global_currentACLs.length] = '.$result['uid'].' ;
+                                               </script>
+
+                                       </td>
+                                       <td class="bgColor-20">
+                                               <input type="hidden" name="'.$acl_prefix.'[recursive]" value="0" />
+                                               <input type="checkbox" name="'.$acl_prefix.'[recursive]" value="1" '.($result['recursive']?'checked="checked"':'').' />
+                                       </td>
+                                       <td><a href="#" onClick="deleteACL('.$result['uid'].')"><img '.t3lib_iconWorks::skinImg('../../../', 'gfx/garbage.gif').' alt="'.$LANG->getLL('delAcl',1).'" /></a></td>
+                               </tr>';
+               }
+
+               $code .= '
+                               </tbody>
+                       </table>
+                       <br />
+                       <span id="insertHiddenFields"></span>
+                       <img '.t3lib_iconWorks::skinImg('../../../', 'gfx/garbage.gif').' alt="'.$LANG->getLL('delAcl',1).'" / id="templateDeleteImage" style="display:none">
+                       <a href="javascript:addACL()"><img  '.t3lib_iconWorks::skinImg('../../../', 'gfx/new_el.gif').' alt="'.$LANG->getLL('addAcl',1).'" />'.$LANG->getLL('addAcl',1).'</a><br>
+
+                       <input type="hidden" name="data[pages]['.$this->id.'][perms_user]" value="'.$this->pageinfo['perms_user'].'" />
+                       <input type="hidden" name="data[pages]['.$this->id.'][perms_group]" value="'.$this->pageinfo['perms_group'].'" />
+                       <input type="hidden" name="data[pages]['.$this->id.'][perms_everybody]" value="'.$this->pageinfo['perms_everybody'].'" />
+                       '.($disableOldPermissionSystem?'':$this->getRecursiveSelect($this->id,$this->perms_clause)).'
+                       <input type="submit" name="submit" value="'.$LANG->getLL('saveAndClose',1).'" />'.
+                       '<input type="submit" value="'.$LANG->getLL('Abort',1).'" onclick="'.htmlspecialchars('jumpToUrl(\'index.php?id='.$this->id.'\'); return false').'" />
+                       <input type="hidden" name="redirect" value="'.htmlspecialchars(TYPO3_MOD_PATH.'index.php?mode='.$this->MOD_SETTINGS['mode'].'&depth='.$this->MOD_SETTINGS['depth'].'&id='.intval($this->return_id).'&lastEdited='.$this->id).'" />
+               ';
+
+                       // Adding section with the permission setting matrix:
+               $this->content.=$this->doc->divider(5);
+               $this->content.=$this->doc->section($LANG->getLL('permissions').':',$code);
+
+                       // CSH for permissions setting
+               $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'perm_module_setting', $GLOBALS['BACK_PATH'],'<br/><br/>');
+
+                       // Adding help text:
+               if ($BE_USER->uc['helpText'])   {
+                       $this->content.=$this->doc->divider(20);
+                       $legendText = '<b>'.$LANG->getLL('1',1).'</b>: '.$LANG->getLL('1_t',1);
+                       $legendText.= '<br /><b>'.$LANG->getLL('16',1).'</b>: '.$LANG->getLL('16_t',1);
+                       $legendText.= '<br /><b>'.$LANG->getLL('2',1).'</b>: '.$LANG->getLL('2_t',1);
+                       $legendText.= '<br /><b>'.$LANG->getLL('4',1).'</b>: '.$LANG->getLL('4_t',1);
+                       $legendText.= '<br /><b>'.$LANG->getLL('8',1).'</b>: '.$LANG->getLL('8_t',1);
+
+                       $code=$legendText.'<br /><br />'.$LANG->getLL('def',1);
+                       $this->content.=$this->doc->section($LANG->getLL('Legend',1).':',$code);
+               }
+       }
+
+
+       /*****************************
+        *
+        * Helper functions
+        *
+        *****************************/
+        /**
+         * generates title attribute for pages
+               *
+               * @param        integer         UID of page
+               * @param        array           BE user array
+               * @param        array           BE group array
+               * @return       string          HTML: title attribute
+               */
+       function generateTitleAttribute($uid, $be_user_Array, $be_group_Array)  {
+
+               $composedStr = '';
+               $this->aclList[$uid];
+               if (!$this->aclList[$uid])      {return FALSE;}
+               foreach ($this->aclList[$uid] as $type => $v1)  {
+                       if (!$v1)       {return FALSE;}
+                       foreach ($v1 as $object_id => $v2)      {
+                               if ($v2['newAcl'])      {
+                                       if ($type == 1) { // group
+                                               $composedStr .= ' G:'.$be_group_Array[$object_id]['title'];
+                                       } else {
+                                               $composedStr .= ' U:'.$be_user_Array[$object_id]['username'];
+                                       }
+                               }
+                       }
+               }
+               return ' title="'.$composedStr.'"'.($composedStr?' class="bgColor5"':'');
+       }
+       /**
+        * outputs a selector for users / groups, returns current ACLs
+        *
+        * @param       integer         type of ACL. 0 -> user, 1 -> group
+        * @param       string          Pointer where the display code is stored
+        * @param       array           configuration of ACLs
+        * @return      array           list of groups/users where the ACLs will be shown
+        */
+       function acl_objectSelector($type, &$displayPointer, $conf) {
+               global $BE_USER;
+               $aclObjects = Array();
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                       'tx_beacl_acl.object_id AS object_id, tx_beacl_acl.type AS type',
+                       'tx_beacl_acl, be_groups, be_users',
+                       'tx_beacl_acl.type='.intval($type).' AND ((tx_beacl_acl.object_id=be_groups.uid AND tx_beacl_acl.type=1) OR (tx_beacl_acl.object_id=be_users.uid AND tx_beacl_acl.type=0))',
+                       '',
+                       'be_groups.title ASC, be_users.realname ASC'
+               );
+               while ($result = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                       $aclObjects[] = $result['object_id'];
+               }
+               $aclObjects = array_unique($aclObjects);
+                       // advanced selector disabled
+               if(!$conf['enableFilterSelector']) {
+                       return $aclObjects;
+               }
+
+               if(!empty($aclObjects)) {
+
+                               // Get usernames and groupnames: The arrays we get in return contains only 1) users which are members of the groups of the current user, 2) groups that the current user is member of
+                       $groupArray = $BE_USER->userGroupsUID;
+                       $be_user_Array = t3lib_BEfunc::getUserNames();
+                       if (!$GLOBALS['BE_USER']->isAdmin())            $be_user_Array = t3lib_BEfunc::blindUserNames($be_user_Array,$groupArray,0);
+                       $be_group_Array = t3lib_BEfunc::getGroupNames();
+                       if (!$GLOBALS['BE_USER']->isAdmin())            $be_group_Array = t3lib_BEfunc::blindGroupNames($be_group_Array,$groupArray,0);
+
+                               // get current selection from UC, merge data, write it back to UC
+                       $currentSelection = is_array($BE_USER->uc['moduleData']['txbeacl_aclSelector'][$type]) ? $BE_USER->uc['moduleData']['txbeacl_aclSelector'][$type] : array();
+
+                       $currentSelectionOverride_raw = t3lib_div::_GP('tx_beacl_objsel');
+                       $currentSelectionOverride = Array();
+                       if(is_array($currentSelectionOverride_raw[$type])) {
+                               foreach($currentSelectionOverride_raw[$type] as $tmp) {
+                                       $currentSelectionOverride[$tmp] = $tmp;
+                               }
+                       }
+                       if ($currentSelectionOverride) {
+                               $currentSelection = $currentSelectionOverride;
+                       }
+                       $BE_USER->uc['moduleData']['txbeacl_aclSelector'][$type] = $currentSelection;
+                       $BE_USER->writeUC($BE_USER->uc);
+
+                               // display selector
+                       $displayCode = '<select size="'.t3lib_div::intInRange(count($aclObjects),5,15).'" name="tx_beacl_objsel['.$type.'][]" multiple="multiple">';
+                       foreach($aclObjects as $singleObjectId) {
+                               if($type == 0)
+                                       $tmpnam = $be_user_Array[$singleObjectId]['username'];
+                               else
+                                       $tmpnam = $be_group_Array[$singleObjectId]['title'];
+
+                               $displayCode .= '<option value="'.$singleObjectId.'" '.(@in_array($singleObjectId, $currentSelection)?'selected':'').'>'.$tmpnam.'</option>';
+                       }
+
+                       $displayCode .= '</select>';
+                       $displayCode .= '<br /><input type="button" value="'.$GLOBALS['LANG']->getLL('aclObjSelUpdate').'" onClick="document.editform.action=document.location; document.editform.submit()" /><p />';
+
+                               // create section
+                       switch($type) {
+                               case 0:
+                                       $tmpnam = 'aclUsers';
+                                       break;
+                               default:
+                                       $tmpnam = 'aclGroups';
+                                       break;
+                       }
+                       $displayPointer = $this->doc->section($GLOBALS['LANG']->getLL($tmpnam,1),$displayCode);
+
+                       return $currentSelection;
+               }
+               return NULL;
+       }
+
+
+       /**
+        * returns a datastructure: pageid - userId / groupId - permissions
+        *
+        * @param       array           user ID list
+        * @param       array           group ID list
+        */
+       function buildACLtree($users, $groups) {
+
+                       // get permissions in the starting point for users and groups
+               $rootLine = t3lib_BEfunc::BEgetRootLine($this->id);
+
+               $userStartPermissions = array();
+               $groupStartPermissions = array();
+
+               array_shift($rootLine); // needed as a starting point
+
+               foreach($rootLine as $level => $values) {
+                       $recursive = ' AND recursive=1';
+
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('type, object_id, permissions', 'tx_beacl_acl', 'pid='.intval($values['uid']).$recursive);
+
+                       while ($result = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                               if ($result['type'] == 0
+                                       && in_array($result['object_id'], $users)
+                                       && !array_key_exists($result['object_id'], $userStartPermissions)) {
+                                       $userStartPermissions[$result['object_id']] = $result['permissions'];
+                               } elseif ($result['type'] == 1
+                                       && in_array($result['object_id'], $groups)
+                                       && !array_key_exists($result['object_id'], $groupStartPermissions)) {
+                                       $groupStartPermissions[$result['object_id']] = $result['permissions'];
+                               }
+                       }
+               }
+               foreach($userStartPermissions as $oid => $perm) {
+                       $startPerms[0][$oid]['permissions'] = $perm;
+                       $startPerms[0][$oid]['recursive'] = 1;
+               }
+               foreach($groupStartPermissions as $oid => $perm) {
+                       $startPerms[1][$oid]['permissions'] = $perm;
+                       $startPerms[1][$oid]['recursive'] = 1;
+               }
+
+
+               $this->traversePageTree_acl($startPerms,$rootLine[0]['uid']);
+
+               // check if there are any ACLs on these pages
+               // build a recursive function traversing through the pagetree
+       }
+
+       function countAcls($pageData)   {
+               $i = 0;
+               if (!$pageData) return '';
+               foreach ($pageData as $aclId => $values)        {
+                       if ($values['newAcl'])  {
+                               $i+=$values['newAcl'];
+                       }
+               }
+               return ($i?$i:'');
+       }
+
+       /**
+        * build ACL tree
+        */
+       function traversePageTree_acl($parentACLs, $uid) {
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('type, object_id, permissions, recursive', 'tx_beacl_acl', 'pid='.intval($uid));
+
+               $hasNoRecursive = array();
+               $this->aclList[$uid] = $parentACLs;
+               while ($result = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                       $permissions = array (
+                                       'permissions' => $result['permissions'],
+                                       'recursive' => $result['recursive'],
+                               );
+                       if($result['recursive'] == 0) {
+                               if ($this->aclList[$uid][$result['type']][$result['object_id']]['newAcl'])      {
+                                       $permissions['newAcl'] = $this->aclList[$uid][$result['type']][$result['object_id']]['newAcl'];
+                               }
+                               $this->aclList[$uid][$result['type']][$result['object_id']] = $permissions;
+                               $permissions['newAcl'] = 1;
+                               $hasNoRecursive[$uid][$result['type']][$result['object_id']] = $permissions;
+                       } else {
+                               $parentACLs[$result['type']][$result['object_id']] = $permissions;
+                               if (is_array($hasNoRecursive[$uid][$result['type']][$result['object_id']]))     {
+                                       $this->aclList[$uid][$result['type']][$result['object_id']] = $hasNoRecursive[$uid][$result['type']][$result['object_id']];
+                               } else {
+                                       $this->aclList[$uid][$result['type']][$result['object_id']] = $permissions;
+                               }
+                       }
+                       $this->aclList[$uid][$result['type']][$result['object_id']]['newAcl'] += 1;
+               }
+
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'pid='.intval($uid).' AND deleted=0');
+               while ($result = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                       $this->traversePageTree_acl($parentACLs, $result['uid']);
+               }
+       }
+
+       /**
+        * prints table header
+        *
+        * @param       array           array of cells
+        * @return      string          HTML output for the cells
+        */
+       function printTableHeader($cells)       {
+               global $BACK_PATH;
+               $verticalDivider = '<td class="bgColor2"><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/line.gif','width="5" height="16"').' alt="" /></td>';
+               $wrappedCells = Array();
+               foreach($cells as $singleCell) {
+                       $wrappedCells[] = '<td class="bgColor2" align="center"><b>'.$singleCell.'</b></td>';
+               }
+               return implode($verticalDivider,$wrappedCells);
+
+       }
+
+       /**
+        * Print a checkbox for the edit-permission form
+        *
+        * @param       string          Checkbox name key
+        * @param       integer         Checkbox number index
+        * @param string                Result sting, not mandatory
+        * @return      string          HTML checkbox
+        */
+       function printCheckBox($checkName,$num, $result = '')   {
+               if(empty($result)) {
+                       $result = 'data[pages]['.$GLOBALS['SOBE']->id.']['.$checkName.']';
+               }
+
+               $onClick = 'checkChange(\'check['.$checkName.']\', \''.$result.'\')';
+               return '<input type="checkbox" name="check['.$checkName.']['.$num.']" onclick="'.htmlspecialchars($onClick).'" /><br />';
+       }
+
+       /**
+        * Print a set of permissions
+        *
+        * @param       integer         Permission integer (bits)
+        * @return      string          HTML marked up x/* indications.
+        */
+       function printPerms($int)       {
+               $str='';
+               $str.= (($int&1)?'*':'<span class="perm-denied">x</span>');
+               $str.= (($int&16)?'*':'<span class="perm-denied">x</span>');
+               $str.= (($int&2)?'*':'<span class="perm-denied">x</span>');
+               $str.= (($int&4)?'*':'<span class="perm-denied">x</span>');
+               $str.= (($int&8)?'*':'<span class="perm-denied">x</span>');
+
+               return '<span class="perm-allowed">'.$str.'</span>';
+       }
+
+
+}
+?>
diff --git a/res/locallang_perm.php b/res/locallang_perm.php
new file mode 100644 (file)
index 0000000..97c756d
--- /dev/null
@@ -0,0 +1,114 @@
+<?php
+/**
+ * Language labels for plugin BE ACL
+ *
+ * This file is detected by the translation tool.
+ */
+
+$LOCAL_LANG = Array (
+       'default' => Array (
+               'recursiveAcl' => 'Recursive',
+               'addAcl' => 'Add ACL',
+               'delAcl' => 'Delete ACL',
+               'saveAndClose' => 'Save and Close',
+               'aclUsers' => 'ACL Users',
+               'aclGroups' => 'ACL Groups',
+               'aclUser' => 'User',
+               'aclGroup' => 'Group',
+               'aclObjSelUpdate' => 'Update!',
+       ),
+       'dk' => Array (
+               'recursiveAcl' => 'Rekursiv',
+               'addAcl' => 'Tilføj ACL',
+               'delAcl' => 'Slet ACL',
+               'saveAndClose' => 'Gem og luk',
+               'aclUsers' => 'ACL brugere',
+               'aclGroups' => 'ACL grupper',
+               'aclUser' => 'Bruger',
+               'aclGroup' => 'Gruppe',
+               'aclObjSelUpdate' => 'Opdatér!',
+       ),
+       'de' => Array (
+       ),
+       'no' => Array (
+       ),
+       'it' => Array (
+       ),
+       'fr' => Array (
+       ),
+       'es' => Array (
+       ),
+       'nl' => Array (
+       ),
+       'cz' => Array (
+       ),
+       'pl' => Array (
+       ),
+       'si' => Array (
+       ),
+       'fi' => Array (
+       ),
+       'tr' => Array (
+       ),
+       'se' => Array (
+       ),
+       'pt' => Array (
+       ),
+       'ru' => Array (
+       ),
+       'ro' => Array (
+       ),
+       'ch' => Array (
+       ),
+       'sk' => Array (
+       ),
+       'lt' => Array (
+       ),
+       'is' => Array (
+       ),
+       'hr' => Array (
+       ),
+       'hu' => Array (
+       ),
+       'gl' => Array (
+       ),
+       'th' => Array (
+       ),
+       'gr' => Array (
+       ),
+       'hk' => Array (
+       ),
+       'eu' => Array (
+       ),
+       'bg' => Array (
+       ),
+       'br' => Array (
+       ),
+       'et' => Array (
+       ),
+       'ar' => Array (
+       ),
+       'he' => Array (
+       ),
+       'ua' => Array (
+       ),
+       'lv' => Array (
+       ),
+       'jp' => Array (
+       ),
+       'vn' => Array (
+       ),
+       'ca' => Array (
+       ),
+       'ba' => Array (
+       ),
+       'kr' => Array (
+       ),
+       'eo' => Array (
+       ),
+       'my' => Array (
+       ),
+       'hi' => Array (
+       ),
+);
+?>
\ No newline at end of file
diff --git a/tca.php b/tca.php
new file mode 100644 (file)
index 0000000..abbd2bc
--- /dev/null
+++ b/tca.php
@@ -0,0 +1,69 @@
+<?php
+if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+
+$TCA['tx_beacl_acl'] = Array (
+       'ctrl' => $TCA['tx_beacl_acl']['ctrl'],
+       'interface' => Array (
+               'showRecordFieldList' => 'type,object_id,permissions,recursive'
+       ),
+       'feInterface' => $TCA['tx_beacl_acl']['feInterface'],
+       'columns' => Array (
+               'type' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:be_acl/locallang_db.php:tx_beacl_acl.type',
+                       'config' => Array (
+                               'type' => 'select',
+                               'items' => Array (
+                                       Array('LLL:EXT:be_acl/locallang_db.php:tx_beacl_acl.type.I.0', '0'),
+                                       Array('LLL:EXT:be_acl/locallang_db.php:tx_beacl_acl.type.I.1', '1'),
+                               ),
+                               'size' => 1,
+                               'maxitems' => 1,
+                       )
+               ),
+               'object_id' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:be_acl/locallang_db.php:tx_beacl_acl.object_id',
+                       'config' => Array (
+                               'type' => 'select',
+                               #'foreign_table' => 'be_users',
+                               #'foreign_table_where' => '',
+                               'itemsProcFunc' => 'tx_beacl_objsel->select',
+                               'size' => 1,
+                               'minitems' => 0,
+                               'maxitems' => 1,
+                       )
+               ),
+               'permissions' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:be_acl/locallang_db.php:tx_beacl_acl.permissions',
+                       'config' => Array (
+                               'type' => 'check',
+                               'cols' => 5,
+                               'items' => Array (
+                                       Array('LLL:EXT:be_acl/locallang_db.php:tx_beacl_acl.permissions.I.0', ''),
+                                       Array('LLL:EXT:be_acl/locallang_db.php:tx_beacl_acl.permissions.I.1', ''),
+                                       Array('LLL:EXT:be_acl/locallang_db.php:tx_beacl_acl.permissions.I.2', ''),
+                                       Array('LLL:EXT:be_acl/locallang_db.php:tx_beacl_acl.permissions.I.3', ''),
+                                       Array('LLL:EXT:be_acl/locallang_db.php:tx_beacl_acl.permissions.I.4', ''),
+                               ),
+                       )
+               ),
+               'recursive' => Array (
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:be_acl/locallang_db.php:tx_beacl_acl.recursive',
+                       'config' => Array (
+                               'type' => 'check'
+                       )
+               ),
+       ),
+       'types' => Array (
+               '0' => Array('showitem' => 'type;;;;1-1-1, object_id, permissions, recursive'),
+               '1' => Array('showitem' => 'type;;;;1-1-1, object_id, permissions, recursive')
+       ),
+       'palettes' => Array (
+               '1' => Array('showitem' => '')
+       )
+);
+
+?>
\ No newline at end of file