[Typo3-dev] Hook request: t3lib_userauthgroup
"Stig N. Færch"
stig at 8620.dk
Mon May 23 23:09:34 CEST 2005
Some time ago I posted something about permissions/roles.
http://lists.netfielders.de/pipermail/typo3-dev/2004-December/007393.html
I just found that what I really want to do is actually quite simple
through an BE_extension, though I need a hook for it.
I want to create a new field in the be_groups table called 'role', so
that you can mark be_groups as roles.
If a user is assigned more than one role, the user can now switch among
its roles through a selector-box.
When a role is selected, only the permissions and mounts of this
be_group(and it's non-role child be_groups) and be_groups which are not
roles will be activated.
This can all be controlled through the function fetchGroups in
t3lib_userauthgroup.php.
Instead of this:
###$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*',
$this->usergroup_table, 'deleted=0 AND hidden=0 AND pid=0 AND uid IN
('.$grList.')'.$lockToDomain_SQL);###
I could use this:
###$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*',
this->usergroup_table, 'deleted=0 AND hidden=0 AND pid=0 AND uid IN
('.$grList.') AND !(role=1 AND uid NOT IN
('.$roleIdList.'))'.$lockToDomain_SQL);###
... to deactive not activated roles.
Now, - I haven't tried to use hooks before, - but if I had a hook in
this function, - wouldn't I be able to reach my goal?
Any ideas how to implement this the best way?
Best Regards
Stig Nørgaard Færch
More information about the TYPO3-dev
mailing list