Skip to content
Snippets Groups Projects
Commit ec5111f8 authored by Andreas Otto's avatar Andreas Otto
Browse files

Method fetchGroups():

* Added hook as requested and provided by Stig N. Faerch.
*
* This hook is used by the extension 'roles'. With this hook it's possible to
* control the backend usergroup access, through manipulating a sql-sentence.
* In the case of 'roles', the hook is used to limit access to the selected
* backend usergroup (which is marked as a role). This is very powerful when
* you need to have a better overview in the backend.


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@770 709f56b5-9817-0410-a4d7-c38de5d9e867
parent d57a79c5
No related merge requests found
......@@ -832,7 +832,19 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
// Fetching records of the groups in $grList (which are not blocked by lockedToDomain either):
$lockToDomain_SQL = ' AND (lockToDomain=\'\' OR lockToDomain=\''.t3lib_div::getIndpEnv('HTTP_HOST').'\')';
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $this->usergroup_table, 'deleted=0 AND hidden=0 AND pid=0 AND uid IN ('.$grList.')'.$lockToDomain_SQL);
$whereSQL = 'deleted=0 AND hidden=0 AND pid=0 AND uid IN ('.$grList.')'.$lockToDomain_SQL;
// Hook for manipulation of the WHERE sql sentence which controls which BE-groups are included
if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['fetchGroupQuery'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['fetchGroupQuery'] as $classRef) {
$hookObj = &t3lib_div::getUserObj($classRef);
if(method_exists($hookObj,'fetchGroupQuery_processQuery')){
$whereSQL = $hookObj->fetchGroupQuery_processQuery($this, $grList, $idList, $whereSQL);
}
}
}
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $this->usergroup_table, $whereSQL);
// The userGroups array is filled
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment