Project

General

Profile

Actions

Bug #15246

closed

New hook in class.t3lib_userauthgroup.php

Added by Rik Hoevers almost 19 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2005-11-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
3.8.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hi,

For a client I made a hook in class.t3lib_userauthgroup.php in the fetchGroups subroutine. Is it possible to add this hook to the official TYPO3 distribution?

In the attached file I marked my changes with "XXX" (2 places).

If this is not the place to make such a request, then please accept my apologies.

Best regards,

Rik Hoevers
Netcreators

(issue imported from #M1952)


Files

class.t3lib_userauthgroup.php (45.7 KB) class.t3lib_userauthgroup.php Administrator Admin, 2005-11-29 15:55
class.t3lib_userauthgroup.php.diff (559 Bytes) class.t3lib_userauthgroup.php.diff Administrator Admin, 2005-11-30 16:43
class.user_firstMainGroup.php (384 Bytes) class.user_firstMainGroup.php Administrator Admin, 2006-01-02 10:55
bug_1952_2.patch (1.09 KB) bug_1952_2.patch Administrator Admin, 2006-01-18 22:11
Actions #1

Updated by Sebastian Kurfuerst almost 19 years ago

Hi Rik,
can you attach a patch in unified diff format? This would help even more to get it faster into the core.
Greets, Sebastian

Actions #2

Updated by Rik Hoevers almost 19 years ago

Hey Sebastian, thnx for your fast reply! :-)

I'd be glad to attach the patch... could you tell me the command that I should issue to produce it?

Regards, Rik

Actions #3

Updated by Sebastian Kurfuerst almost 19 years ago

Hi,
see this link for more information: http://de.wikipedia.org/wiki/Diff
if you are using windows, there is a windows implementation as well.
Greets,
Sebastian

Actions #4

Updated by Rik Hoevers almost 19 years ago

ok, check... i made a diff with the 3.8.0 original version,

grtz - rik

Actions #5

Updated by Rik Hoevers almost 19 years ago

So, I wonder, will this hook be integrated in future versions of TYPO3?

Actions #6

Updated by Sebastian Kurfuerst almost 19 years ago

Hi Rik,

I just checked the hook again and have a question about it: What exactly do you need it for in your application? I discussed it with Stucki and we are curious what the sense is of the hook.
Thanks!
Greets, Sebastian

Actions #7

Updated by Rik Hoevers almost 19 years ago

Happy newyear all!

The situation is as follows: a client maintains the backend users with a LDAP import / update. The imported users are all members of a bunch of groups, most of them of no importance for TYPO3. But they are all member of 1 group with a name like "typo3_<lalala>" which is the group that is relevant when logging in in TYPO3. The groups are imported in a random order, but when an editor creates a new page, this page belongs to the group that is the first in the list of groups. Quite often this is a different group than the "typo3_<lala>" group which leads to problems with permissions when another editor wants to edit the page.

Even manually re-sorting the groups is no sollution, because the are scrambled after each LDAP update.

To fix this I created a small extension (I uploaded the main file, class.user_firstMainGroup.php) that checks the name of a group, and sets it as firstMainGroup if it matches typo3

Since I'm new to programming TYPO3 I suspect that this can be done more efficiently than this, but it works and the client is quite and seems to be happy. I hate to leave them with a non-upgradable TYPO3 installation though.

I hope this explains enough, best regards,

Rik

Actions #8

Updated by Sebastian Kurfuerst almost 19 years ago

Hi, I would suggest a hook as suggested in 1952_2.patch. I think by manipulating $this, everything can be done.
What do you think?

Greets, Sebastian

Actions #9

Updated by Michael Stucki almost 19 years ago

Sebastian: +1

Actions #10

Updated by Sebastian Kurfuerst almost 19 years ago

The hook is in the core now.
Greets, Sebastian

Actions

Also available in: Atom PDF