Feature #60751
closedFrontendUser: Add method to get group-memberships recursive
0%
Description
Method getUsergroup() gets the Usergroup-property (0..n groups). Subgroups of those are not resolved. You'll have to do a getSubgroup() on each of them recursively yourself so far.
Updated by Stefan Neufeind over 10 years ago
- Category set to Extbase
This is about the Extbase-model for Frontend-users. So maybe let's put it in the Extbase-category.
Updated by Jigal van Hemert over 10 years ago
This is a simplification of a way to get the actual groups that an FE user is a member of. \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::fetchGroupData() will ask the authentication services to retrieve the group data. For the default authentication service the groups are retrieved recursively, filtered for double groups and with a check for circular dependencies.
Instead of a db query the same approach should be used to get the entire list of groups.
Updated by Stefan Neufeind over 10 years ago
Looked it up in the core-code. I didn't know that way to do it through services. But yes, that looks nice. I'm unsure how to make it easily usable though (as part of Extbase, as a separate tool-function or whatever) without much code-duplication. Some parts in there are specific for the usecase (like collecting TS-settings).
Currently if some extension uses the Extbase-models to fetch the user-record for the current user "by hand" (takes uid from global variable, performs a findByUid on the repo) and then fetches groups no services are involved at all.
The way by using services seems like the right way to go for most such usecases imho, while "fetching a record" (through the repos) is more the lowlevel-way.
Updated by Wouter Wolters about 9 years ago
- Status changed from New to Closed
See reasoning why we won't have this in https://review.typo3.org/#/c/30978/
Closed this request.