Bug #20523
closedTurning off the admin-panel results in error
0%
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
Updated by Christian Kuhn over 15 years ago
Please try attached patch.
TS:
config.admPanel = 1
User-TS:
admPanel >
Updated by Niels Fröhling over 15 years ago
I'll try. Maybe I don't find the time until bug-day.
Updated by Niels Fröhling over 15 years ago
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.
Updated by Rupert Germann over 15 years ago
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.
Updated by Oliver Hader about 15 years ago
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.