Bug #20523
closed
Turning off the admin-panel results in error
Added by Niels Fröhling over 15 years ago.
Updated over 14 years ago.
Description
Turning off the admin-panel (it's a 'admin' BE-user with adminPanel = 0 in the user's TS-config) results in error when using the Web->View:
Fatal error: Call to a member function display() on a non-object in /var/www/typo3-svn-semantic/t3lib/class.t3lib_tsfebeuserauth.php on line 251
(issue imported from #M11212)
Files
Please try attached patch.
TS:
config.admPanel = 1
User-TS:
admPanel >
I'll try. Maybe I don't find the time until bug-day.
I think your patch can work from reading, but I actually added a check for the validity of the adminPanel-object itself:
if ($this->adminPanel ...
I don't know which makes more sense. Your solution, in the presence of wrong-doing, clearly will produce a noticable error, which probably is desired.
I attached a new patch (v2).
I moved the check for $BE_USER->extAdmEnabled to index_ts (like it was in 4.2.x) because then the calls to echo and to displayAdminPanel() are prevented is no admPanel is enabled.
Rupert, I don't think the echo with no content is bad. However, an alternative would be a new method t3lib_tsfebeuserauth->isAdminPanelEnabled() - I'd like to have the logic whether the admin panel shall be displayed or not at one place.
committed to trunk rev 5825
Also available in: Atom
PDF