[TYPO3-english] Redirect to login instead of 404 error page if fe_user has no correct permission

Pablo Feldman pablofeldman90 at gmail.com
Fri Dec 14 16:16:30 CET 2012


Ok Thanks! I'll do this

*"Afortunadamente nadie pudo patentar en su día el fuego, el molino, la
escalera, la bombilla, la carretera, la danza, la partitura, el periódico,
el supermercado o la estructura de cuatro paredes con un techo, dos
ventanas y una puerta. El progreso de la humanidad no es una historia de
sucesivas invenciones originales, sino de copias gradualmente mejoradas,
ideas existentes a las que se les añade elementos innovadores."*
*
*
*
*
*
*
*Tec. Pablo Feldman*
*Web Developer*
http://www.pfeldman.com.ar



On Fri, Dec 14, 2012 at 6:36 AM, Jigal van Hemert <
jigal.van.hemert at typo3.org> wrote:

> Hi,
>
>
> On 13-12-2012 19:57, Jan Bartels wrote:
>
>> I think there's no official way to do it. I have written an own
>> 404-Handler that parses the error-message. If the string contains
>> something with "access" the handler redirects to the login-page. If the
>> string is not found, the handler retrieves the 404-page. This approach
>> works with internal restricted links as well as with links from extern.
>>
>
> The USER_FUNC handler receives rather detailed information:
>
> array(
>   'currentUrl' => [requested uri],
>   'reasonText' => [textual explanation],
>   'pageAccessFailureReasons' => [array with access information for the
> rootline]
> )
>
> The pageAccessFailureReasons array contains the properties which lead to
> the denied access:
> array(
>   'hidden' => array( [pageId] => TRUE, ... ),
>   'starttime' => array( [pageId] => [starttime], ... ),
>   'endtime' => array( [pageId] => [endtime], ... ),
>   'fe_group' => array( [pageId] => [fe_group], ... )
> )
>
> If 'extendToSubpages' was set for a page higher in the rootline the page
> ID of that page is used in the array.
>
> The reasonText can be found in \TYPO3\CMS\Frontend\**Controller\**TypoScriptFrontendController
> (previously tslib_fe ); search for page(.*)AndExit .
>
>
>  Maybe you should file a feature-request for the core on forge to support
>> separate handlers for 404- and 401-errors in the future.
>>
>
> About 401: "The response MUST include a WWW-Authenticate header field
> containing a challenge applicable to the requested resource."
> The normal login in a TYPO3 site is not done by HTTP Authentication.
>
> It would be nice to have more powerful 404 handling. Maybe it can be done
> with an extension. If this extension needs something from the core it can
> always be introduced.
>
>
> --
> Jigal van Hemert
> TYPO3 Core Team member
>
> TYPO3 .... inspiring people to share!
> Get involved: typo3.org
> ______________________________**_________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**english<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english>
>


More information about the TYPO3-english mailing list