[TYPO3-core] RFC #11391: Add a button to let admins create the file ENABLE_INSTALL_TOOL from the backend

Andy Grunwald [wmdb] andreas.grunwald at wmdb.de
Fri Jul 3 12:10:38 CEST 2009


Michael Stucki schrieb:
> Hi Sven,
> 
>> the patch not work on 4.2.7, there is no definition for "$this->isAdmin"
>>
>> there is a follow Patch at bugtracker
> 
> Thanks for investigating, of course you are right. The patch worked well 
> in Trunk and could be applied easily for the other versions, but I 
> didn't notice that the button isn't there at all.
> 
> Attached is a patch which brings it back at least in 4.2. May someone 
> please test it in 4.1 and confirm if it works? Thanks in advance.
> 
> - michael
> 

Why we have three ways to check if a user is an Admin?
- $this->isAdmin
- $BE_USER->isAdmin()
- $scriptUser->isAdmin()

i recognized, that $BE_USER->isAdmin() and $scriptUser->isAdmin() are 
the same method (but it depends on the object).
In my opinion, the best way is to use $scriptUser->isAdmin() in the 
whole script and remove $this->isAdmin and $BE_USER->isAdmin().

In this way we have a script which is consistent and one interface to 
check if a user is an admin or not.

if this way welcome i want to create a patch.

for Stuckis patch, my result is -1, because the reasons above and the 
overhead with the new class property "isAdmin".

andy


More information about the TYPO3-team-core mailing list