Commit 7ce1e3f0 authored by Kasper Skårhøj's avatar Kasper Skårhøj
Browse files

Various; 3 new access control modes; CSH changes; moving sys_language to core...

Various; 3 new access control modes; CSH changes; moving sys_language to core (see changelog for details).


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@427 709f56b5-9817-0410-a4d7-c38de5d9e867
parent ab89d208
2004-08-07 Kasper Skårhøj,,, <kasper@typo3.com>
* Added three new permission modes for backend users: 1) Localization access control, 2) Access control on value level (for instance allow/deny individual selectorbox values), 3) API for custom permission options.
* Implemented control of these modes in tcemain, tceforms and alt_doc.php + QuickEdit. Still need to implement it for edit icons around, but this is not critical, mostly a usability issue.
* Moved table "sys_language" from extension "cms" back into the core
* Updated CSH at various places.
* Finished the accessListRenderMode(s) (see 4/8 below)
* Still unsettled about various default settings related to these new options, but will discuss on dev-list.
2004-08-04 Kasper Skårhøj,,, <kasper@typo3.com>
* Added new rendering modes for the "select" type in TCA: You can now render multiple-select lists as either a SINGLE selector box with multiple value selection OR as a list of checkboxes. For mozilla even the icons are rendered nicely in the option tags. Check out the backend user group configurations. Work is still in progress.
......
......@@ -629,6 +629,98 @@ class t3lib_BEfunc {
return $theExcludeArray;
}
/**
* Returns an array with explicit Allow/Deny fields.
* Used for listing these field/value pairs in be_groups forms
*
* @return array Array with information from all of $TCA
*/
function getExplicitAuthFieldValues() {
global $TCA;
// Initialize:
$adLabel = array(
'ALLOW' => $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_core.xml:labels.allow'),
'DENY' => $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_core.xml:labels.deny'),
);
// All TCA keys:
$allowDenyOptions = Array();
$tc_keys = array_keys($TCA);
foreach($tc_keys as $table) {
// Load table
t3lib_div::loadTCA($table);
// All field names configured:
if (is_array($TCA[$table]['columns'])) {
$f_keys = array_keys($TCA[$table]['columns']);
foreach($f_keys as $field) {
$fCfg = $TCA[$table]['columns'][$field]['config'];
if ($fCfg['type']=='select' && $fCfg['authMode']) {
// Check for items:
if (is_array($fCfg['items'])) {
// Get Human Readable names of fields and table:
$allowDenyOptions[$table.':'.$field]['tableFieldLabel'] = $GLOBALS['LANG']->sl($TCA[$table]['ctrl']['title']).': '.$GLOBALS['LANG']->sl($TCA[$table]['columns'][$field]['label']);
// Check for items:
foreach($fCfg['items'] as $iVal) {
if (strcmp($iVal[1],'')) { // Values '' is not controlled by this setting.
// Find iMode:
$iMode = '';
switch((string)$fCfg['authMode']) {
case 'explicitAllow':
$iMode = 'ALLOW';
break;
case 'explicitDeny':
$iMode = 'DENY';
break;
case 'individual':
if (!strcmp($iVal[4],'EXPL_ALLOW')) {
$iMode = 'ALLOW';
} elseif (!strcmp($iVal[4],'EXPL_DENY')) {
$iMode = 'DENY';
}
break;
}
// Set iMode:
if ($iMode) {
$allowDenyOptions[$table.':'.$field]['items'][$iVal[1]] = array($iMode, $GLOBALS['LANG']->sl($iVal[0]), $adLabel[$iMode]);
}
}
}
}
}
}
}
}
return $allowDenyOptions;
}
/**
* Returns an array with system languages:
*
* @return array Array with languages
*/
function getSystemLanguages() {
// Initialize, add default language:
$sysLanguages = array();
$sysLanguages[] = array('Default language', 0);
// Traverse languages
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,title,flag','sys_language','pid=0'.t3lib_BEfunc::deleteClause('sys_language'));
while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$sysLanguages[] = array($row['title'].' ['.$row['uid'].']', $row['uid'], ($row['flag'] ? '../t3lib/gfx/flags/'.$row['flag'] : ''));
}
return $sysLanguages;
}
/**
* Returns a page record (of page with $id) with an extra field "_thePath" set to the record path IF the WHERE clause, $perms_clause, selects the record. Thus is works as an access check that returns a page record if access was granted, otherwise not.
* If $id is zero a pseudo root-page with "_thePath" set is returned IF the current BE_USER is admin.
......@@ -1764,17 +1856,28 @@ class t3lib_BEfunc {
*/
function getCommonSelectFields($table,$prefix) {
global $TCA;
$fields=array();
$fields[]=$prefix.'uid';
$fields[]=$prefix.$TCA[$table]['ctrl']['label'];
$fields = array();
$fields[] = $prefix.'uid';
$fields[] = $prefix.$TCA[$table]['ctrl']['label'];
if ($TCA[$table]['ctrl']['label_alt']) {
$secondFields = t3lib_div::trimExplode(',',$TCA[$table]['ctrl']['label_alt'],1);
while(list(,$fieldN)=each($secondFields)) {
$fields[]=$prefix.$fieldN;
foreach($secondFields as $fieldN) {
$fields[] = $prefix.$fieldN;
}
}
if ($TCA[$table]['ctrl']['selicon_field']) $fields[]=$prefix.$TCA[$table]['ctrl']['selicon_field'];
return implode(',',$fields);
if ($TCA[$table]['ctrl']['selicon_field']) $fields[] = $prefix.$TCA[$table]['ctrl']['selicon_field'];
if ($TCA[$table]['ctrl']['typeicon_column']) $fields[] = $prefix.$TCA[$table]['ctrl']['typeicon_column'];
if (is_array($TCA[$table]['ctrl']['enablecolumns'])) {
if ($TCA[$table]['ctrl']['enablecolumns']['disabled']) $fields[] = $prefix.$TCA[$table]['ctrl']['enablecolumns']['disabled'];
if ($TCA[$table]['ctrl']['enablecolumns']['starttime']) $fields[] = $prefix.$TCA[$table]['ctrl']['enablecolumns']['starttime'];
if ($TCA[$table]['ctrl']['enablecolumns']['endtime']) $fields[] = $prefix.$TCA[$table]['ctrl']['enablecolumns']['endtime'];
if ($TCA[$table]['ctrl']['enablecolumns']['fe_group']) $fields[] = $prefix.$TCA[$table]['ctrl']['enablecolumns']['fe_group'];
}
return implode(',',array_unique($fields));
}
/**
......
......@@ -145,7 +145,10 @@ class t3lib_extMgm {
*/
function extPath($key,$script='') {
global $TYPO3_LOADED_EXT;
if (!isset($TYPO3_LOADED_EXT[$key])) die('TYPO3 Fatal Error: Extension key "'.$key.'" was NOT loaded!');
if (!isset($TYPO3_LOADED_EXT[$key])) {
#debug(array(debug_backtrace()));
die('TYPO3 Fatal Error: Extension key "'.$key.'" was NOT loaded! (t3lib_extMgm::extPath)');
}
return PATH_site.$TYPO3_LOADED_EXT[$key]['siteRelPath'].$script;
}
......@@ -160,7 +163,9 @@ class t3lib_extMgm {
*/
function extRelPath($key) {
global $TYPO3_LOADED_EXT;
if (!isset($TYPO3_LOADED_EXT[$key])) die('TYPO3 Fatal Error: Extension key "'.$key.'" was NOT loaded!');
if (!isset($TYPO3_LOADED_EXT[$key])) {
die('TYPO3 Fatal Error: Extension key "'.$key.'" was NOT loaded! (t3lib_extMgm::extRelPath)');
}
return $TYPO3_LOADED_EXT[$key]['typo3RelPath'];
}
......@@ -253,7 +258,7 @@ class t3lib_extMgm {
foreach($TCA[$table]['types'] as $k => $v) {
if (!$specificTypesList || t3lib_div::inList($specificTypesList,$k)) {
if ($insert) {
$append=true;
......@@ -263,7 +268,7 @@ class t3lib_extMgm {
$parts = explode(';',$fieldInfo);
$theField = trim($parts[0]);
$palette = trim($parts[0]).';;'.trim($parts[2]);
// insert before: find exact field name or palette with number
if (in_array($theField, $positionArr) OR in_array($palette, $positionArr) OR
in_array('before:'.$theField, $positionArr) OR in_array('before:'.$palette, $positionArr)) {
......
This diff is collapsed.
......@@ -426,25 +426,24 @@ class t3lib_TCEmain {
$hookObjectsArr = array();
if (is_array ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'])) {
foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'] as $classRef) {
$hookObjectsArr[] = &t3lib_div::getUserObj ($classRef);
$hookObjectsArr[] = &t3lib_div::getUserObj($classRef);
}
}
reset ($this->datamap);
// Organize tables so that the pages-table are always processed first. This is required if you want to make sure that content pointing to a new page will be created.
$orderOfTables = Array();
if (isset($this->datamap['pages'])) { // Set pages first.
$orderOfTables[]='pages';
}
reset($this->datamap);
while (list($table,) = each($this->datamap)) {
if ($table!='pages') {
$orderOfTables[]=$table;
}
}
// Process the tables...
reset($orderOfTables);
while (list(,$table) = each($orderOfTables)) { // Have found table
foreach($orderOfTables as $table) {
/* Check if
- table is set in $TCA,
- table is NOT readOnly,
......@@ -457,28 +456,26 @@ class t3lib_TCEmain {
}
if (isset($TCA[$table]) && !$this->tableReadOnly($table) && is_array($this->datamap[$table]) && $modifyAccessList) {
if ($this->reverseOrder) {
$this->datamap[$table] = array_reverse ($this->datamap[$table], 1);
$this->datamap[$table] = array_reverse($this->datamap[$table], 1);
}
reset ($this->datamap[$table]);
// For each record from the table, do:
// $id is the record uid, may be a string if new records...
// $incomingFieldArray is the array of fields
while (list($id,$incomingFieldArray) = each($this->datamap[$table])) {
foreach($this->datamap[$table] as $id => $incomingFieldArray) {
if (is_array($incomingFieldArray)) {
// Hook: processDatamap_preProcessIncomingFieldArray
reset($hookObjectsArr);
while (list(,$hookObj) = each($hookObjectsArr)) {
if (method_exists ($hookObj, 'processDatamap_preProcessIncomingFieldArray')) {
$hookObj->processDatamap_preProcessFieldArray ($incomingFieldArray, $table, $id, $this);
foreach($hookObjectsArr as $hookObj) {
if (method_exists($hookObj, 'processDatamap_preProcessIncomingFieldArray')) {
$hookObj->processDatamap_preProcessFieldArray($incomingFieldArray, $table, $id, $this);
}
}
// ******************************
// Checking access to the record
// ******************************
$recordAccess=0;
$recordAccess = 0;
$old_pid_value = '';
if (!t3lib_div::testInt($id)) { // Is it a new record? (Then Id is a string)
$fieldArray = $this->newFieldArray($table); // Get a fieldArray with default values
......@@ -524,36 +521,42 @@ class t3lib_TCEmain {
} else {
debug('Internal ERROR: pid should not be less than zero!');
}
$status='new'; // Yes new record, change $record_status to 'insert'
$status = 'new'; // Yes new record, change $record_status to 'insert'
} else { // Nope... $id is a number
$fieldArray = Array();
$recordAccess = $this->checkRecordUpdateAccess($table,$id);
if (!$recordAccess) {
$propArr = $this->getRecordProperties($table,$id);
$this->log($table,$id,2,0,1,"Attempt to modify record '%s' (%s) without permission. Or non-existing page.",2,array($propArr['header'],$table.':'.$id),$propArr['event_pid']);
} else { // Here we fetch the PID of the record that we point to...
$tempdata = $this->recordInfo($table,$id,'pid');
$theRealPid=$tempdata['pid'];
} else { // Next check of the record permissions (internals)
$recordAccess = $this->BE_USER->recordEditAccessInternals($table,$id);
if (!$recordAccess) {
$propArr = $this->getRecordProperties($table,$id);
$this->log($table,$id,2,0,1,"recordEditAccessInternals() check failed. [".$this->BE_USER->errorMsg."]",2,array($propArr['header'],$table.':'.$id),$propArr['event_pid']);
} else { // Here we fetch the PID of the record that we point to...
$tempdata = $this->recordInfo($table,$id,'pid');
$theRealPid = $tempdata['pid'];
}
}
$status='update'; // the default is 'update'
$status = 'update'; // the default is 'update'
}
// **************************************
// If access was granted above, proceed:
// **************************************
if ($recordAccess) {
//debug('tce_main',-2);
list($tscPID) = t3lib_BEfunc::getTSCpid($table,$id,$old_pid_value ? $old_pid_value : $fieldArray['pid']); // Here the "pid" is sent IF NOT the old pid was a string pointing to a place in the subst-id array.
$TSConfig = $this->getTCEMAIN_TSconfig($tscPID);
//debug($TSConfig);
if ($status=='new' && $table=='pages' && is_array($TSConfig['permissions.'])) {
$fieldArray = $this->setTSconfigPermissions($fieldArray,$TSConfig['permissions.']);
}
//debug(array($table,$tscPID));
$fieldArray = $this->fillInFieldArray($table,$id,$fieldArray,$incomingFieldArray,$theRealPid,$status,$tscPID);
$fieldArray = $this->overrideFieldArray($table,$fieldArray);
// NOTICE! All manipulation beyond this point bypasses both "excludeFields" AND possible "MM" relations / file uploads to field!
$fieldArray = $this->overrideFieldArray($table,$fieldArray); // NOTICE: This overriding is potentially dangerous; permissions per field is not checked!!!
// Setting system fields
if ($status=='new') {
......@@ -563,7 +566,7 @@ class t3lib_TCEmain {
if ($TCA[$table]['ctrl']['cruser_id']) {
$fieldArray[$TCA[$table]['ctrl']['cruser_id']]=$this->userid;
}
} elseif ($this->checkSimilar) {
} elseif ($this->checkSimilar) { // Removing fields which are equal to the current value:
$fieldArray = $this->compareFieldArrayWithCurrentAndUnset($table,$id,$fieldArray);
}
if ($TCA[$table]['ctrl']['tstamp']) {
......@@ -571,15 +574,15 @@ class t3lib_TCEmain {
}
// Hook: processDatamap_postProcessFieldArray
reset($hookObjectsArr);
while (list(,$hookObj) = each($hookObjectsArr)) {
if (method_exists ($hookObj, 'processDatamap_postProcessFieldArray')) {
$hookObj->processDatamap_postProcessFieldArray ($status, $table, $id, $fieldArray, $this);
foreach($hookObjectsArr as $hookObj) {
if (method_exists($hookObj, 'processDatamap_postProcessFieldArray')) {
$hookObj->processDatamap_postProcessFieldArray($status, $table, $id, $fieldArray, $this);
}
}
// Performing insert/update. If fieldArray has been unset by some userfunction (see hook above), don't do anything
if (is_array ($fieldArray)) {
// Kasper: Unsetting the fieldArray is dangerous; MM relations might be saved already and files could have been uploaded that are now "lost"
if (is_array($fieldArray)) {
if ($status=='new') {
// if ($pid_value<0) {$fieldArray = $this->fixCopyAfterDuplFields($table,$id,abs($pid_value),0,$fieldArray);} // Out-commented 02-05-02: I couldn't understand WHY this is needed for NEW records. Obviously to proces records being copied? Problem is that the fields are not set anyways and the copying function should basically take care of this!
$this->insertDB($table,$id,$fieldArray);
......@@ -640,53 +643,57 @@ class t3lib_TCEmain {
foreach($incomingFieldArray as $field => $fieldValue) {
if (!in_array($table.'-'.$field, $this->exclude_array) && !$this->data_disableFields[$table][$id][$field]) { // The field must be editable.
// Checking language:
$languageDeny = $TCA[$table]['ctrl']['languageField'] && !strcmp($TCA[$table]['ctrl']['languageField'], $field) && !$this->BE_USER->checkLanguageAccess($fieldValue);
// Stripping slashes - will probably be removed the day $this->stripslashes_values is removed as an option...
if ($this->stripslashes_values) {
if (is_array($fieldValue)) {
t3lib_div::stripSlashesOnArray($fieldValue);
} else $fieldValue = stripslashes($fieldValue);
}
if (!$languageDeny) {
// Stripping slashes - will probably be removed the day $this->stripslashes_values is removed as an option...
if ($this->stripslashes_values) {
if (is_array($fieldValue)) {
t3lib_div::stripSlashesOnArray($fieldValue);
} else $fieldValue = stripslashes($fieldValue);
}
switch ($field) {
case 'uid':
case 'pid':
// Nothing happens, already set
break;
case 'perms_userid':
case 'perms_groupid':
case 'perms_user':
case 'perms_group':
case 'perms_everybody':
// Permissions can be edited by the owner or the administrator
if ($table=='pages' && ($this->admin || $status=='new' || $this->pageInfo($id,'perms_userid')==$this->userid) ) {
$value=intval($fieldValue);
switch($field) {
case 'perms_userid':
$fieldArray[$field]=$value;
break;
case 'perms_groupid':
$fieldArray[$field]=$value;
break;
default:
if ($value>=0 && $value<pow(2,5)) {
switch ($field) {
case 'uid':
case 'pid':
// Nothing happens, already set
break;
case 'perms_userid':
case 'perms_groupid':
case 'perms_user':
case 'perms_group':
case 'perms_everybody':
// Permissions can be edited by the owner or the administrator
if ($table=='pages' && ($this->admin || $status=='new' || $this->pageInfo($id,'perms_userid')==$this->userid) ) {
$value=intval($fieldValue);
switch($field) {
case 'perms_userid':
$fieldArray[$field]=$value;
}
break;
break;
case 'perms_groupid':
$fieldArray[$field]=$value;
break;
default:
if ($value>=0 && $value<pow(2,5)) {
$fieldArray[$field]=$value;
}
break;
}
}
}
break;
default:
if (isset($TCA[$table]['columns'][$field])) {
// Evaluating the value.
$res = $this->checkValue($table,$field,$fieldValue,$id,$status,$realPid,$tscPID);
if (isset($res['value'])) {
$fieldArray[$field]=$res['value'];
break;
default:
if (isset($TCA[$table]['columns'][$field])) {
// Evaluating the value.
$res = $this->checkValue($table,$field,$fieldValue,$id,$status,$realPid,$tscPID);
if (isset($res['value'])) {
$fieldArray[$field]=$res['value'];
}
}
}
break;
}
}
break;
}
} // Checking language.
} // Check exclude fields / disabled fields...
}
// Checking for RTE-transformations of fields:
......@@ -1290,7 +1297,7 @@ class t3lib_TCEmain {
break;
case 'group':
case 'select':
$res = $this->checkValue_group_select($res,$value,$tcaFieldConf,$PP,$uploadedFiles);
$res = $this->checkValue_group_select($res,$value,$tcaFieldConf,$PP,$uploadedFiles,$field);
break;
case 'flex':
if ($field) { // FlexForms are only allowed for real fields.
......@@ -1399,9 +1406,10 @@ class t3lib_TCEmain {
* @param array Field configuration from TCA
* @param array Additional parameters in a numeric array: $table,$id,$curValue,$status,$realPid,$recFID
* @param [type] $uploadedFiles: ...
* @param string Field name
* @return array Modified $res array
*/
function checkValue_group_select($res,$value,$tcaFieldConf,$PP,$uploadedFiles) {
function checkValue_group_select($res,$value,$tcaFieldConf,$PP,$uploadedFiles,$field) {
list($table,$id,$curValue,$status,$realPid,$recFID) = $PP;
// Detecting if value send is an array and if so, implode it around a comma:
......@@ -1421,10 +1429,23 @@ class t3lib_TCEmain {
$valueArray = array_unique($valueArray);
}
// This could be a good spot for parsing the array through a validation-function which checks if the values are allright
// This could be a good spot for parsing the array through a validation-function which checks if the values are allright (except that database references are not in their final form - but that is the point, isn't it?)
// NOTE!!! Must check max-items of files before the later check because that check would just leave out filenames if there are too many!!
// Checking for select / authMode, removing elements from $valueArray if any of them is not allowed!
if ($tcaFieldConf['type']=='select' && $tcaFieldConf['authMode']) {
$preCount = count($valueArray);
foreach($valueArray as $kk => $vv) {
if (!$this->BE_USER->checkAuthMode($table,$field,$vv,$tcaFieldConf['authMode'])) {
unset($valueArray[$kk]);
}
}
// During the check it turns out that the value / all values were removed - we respond by simply returning an empty array so nothing is written to DB for this field.
if ($preCount && !count($valueArray)) {
return array();
}
}
// For group types:
if ($tcaFieldConf['type']=='group') {
......@@ -1451,7 +1472,7 @@ class t3lib_TCEmain {
$valueArray = $this->checkValue_group_select_processDBdata($valueArray,$tcaFieldConf,$id,$status,'select');
}
// BTW, checking for min and max items here does NOT make any sense when MM is used because the above function calls will just return an array with a single item (the count) if MM is used... Why didn't I perform the check before? Probably because we could not evaluate the validity of record uids etc... Hmm...
// Checking the number of items, that it is correct.
// If files, there MUST NOT be too many files in the list at this point, so check that prior to this code.
......@@ -1469,7 +1490,7 @@ class t3lib_TCEmain {
$valueArrayC--;
$newVal[]=$nextVal;
}
$res['value']=implode(',',$newVal);
$res['value'] = implode(',',$newVal);
return $res;
}
......
......@@ -269,6 +269,7 @@ class t3lib_transferData {
// Traverse the configured columns for the table (TCA):
// For each column configured, we will perform processing if needed based on the type (eg. for "group" and "select" types this is needed)
t3lib_div::loadTCA($table);
$copyOfColumns = $TCA[$table]['columns'];
foreach($copyOfColumns as $field => $fieldConfig) {
// Set $data variable for the field, either inputted value from $row - or if not found, the default value as defined in the "config" array
......@@ -678,6 +679,7 @@ class t3lib_transferData {
break;
case 'exclude': // Listing exclude fields.
$theExcludeFields = t3lib_BEfunc::getExcludeFields();
if (is_array($theExcludeFields)) {
foreach($theExcludeFields as $theExcludeFieldsArrays) {
foreach($elements as $eKey => $value) {
......@@ -688,6 +690,49 @@ class t3lib_transferData {
}
}
break;
case 'explicitValues':
$theTypes = t3lib_BEfunc::getExplicitAuthFieldValues();
foreach($theTypes as $tableFieldKey => $theTypeArrays) {
if (is_array($theTypeArrays['items'])) {
foreach($theTypeArrays['items'] as $itemValue => $itemContent) {
foreach($elements as $eKey => $value) {
if (!strcmp($tableFieldKey.':'.$itemValue.':'.$itemContent[0], $value)) {
$dataAcc[$eKey] = rawurlencode($value).'|'.rawurlencode('['.$itemContent[2].'] '.$itemContent[1]);
}
}
}
}
}
break;
case 'languages':
$theLangs = t3lib_BEfunc::getSystemLanguages();
foreach($theLangs as $lCfg) {
foreach($elements as $eKey => $value) {
if (!strcmp($lCfg[1], $value)) {
$dataAcc[$eKey] = rawurlencode($value).'|'.rawurlencode($lCfg[0]);
}
}
}
break;
case 'custom':
$customOptions = $GLOBALS['TYPO3_CONF_VARS']['BE']['customPermOptions'];
if (is_array($customOptions)) {
foreach($customOptions as $coKey => $coValue) {
if (is_array($coValue['items'])) {
// Traverse items:
foreach($coValue['items'] as $itemKey => $itemCfg) {
foreach($elements as $eKey => $value) {
if (!strcmp($coKey.':'.$itemKey, $value)) {
$dataAcc[$eKey] = rawurlencode($value).'|'.rawurlencode($GLOBALS['LANG']->sl($itemCfg[0]));
}
}
}
}
}
}
break;
case 'modListGroup': // Listing modules for GROUPS
case 'modListUser': // Listing modules for USERS:
if (!$this->loadModules) {
......
......@@ -128,7 +128,10 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
'tables_select'=>'',
'tables_modify'=>'',
'pagetypes_select'=>'',
'non_exclude_fields'=>''
'non_exclude_fields'=>'',
'explicit_allowdeny'=>'',
'allowed_languages' => '',
'custom_options' => '',
);
var $includeHierarchy=array(); // For debugging/display of order in which subgroups are included.
var $includeGroupArray=array(); // List of group_id's in the order they are processed.
......@@ -141,7 +144,7 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
var $userTS_dontGetCached=0; // Set this from outside if you want the user TSconfig to ALWAYS be parsed and not fetched from cache.
var $RTE_errors = array(); // RTE availability errors collected.
var $errorMsg = ''; // Contains last error message
......@@ -364,7 +367,7 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
* @param string String to search for in the groupData-list
* @return boolean True if permission is granted (that is, the value was found in the groupData list - or the BE_USER is "admin")
*/
function check ($type,$value) {
function check($type,$value) {
if (isset($this->groupData[$type])) {
if ($this->isAdmin() || $this->inList($this->groupData[$type],$value)) {
return 1;
......@@ -372,6 +375,151 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
}
}