[TYPO3-english] R: Handling of deep linking to protected pages

De Contardi Riccardo Riccardo.DeContardi at bhuman.it
Fri Mar 11 13:57:22 CET 2011


This typoscript worked for me on TYPO3 4.2 (using fe_login and sr_feuser_register):

#navigation object:
lib.menu.1 =TMENU
lib.menu.1 {    
    showAccessRestrictedPages=NONE
    showAccessRestrictedPages.addParams=&tx_srfeuserregister_pi1[backURL]=###RETURN_URL###&redirect_url=###RETURN_URL###
}

#Links in  RTE (uid=2 is the page with fe_login) 

config.typolinkLinkAccessRestrictedPages = 2 
config.typolinkLinkAccessRestrictedPages_addParams = &tx_srfeuserregister_pi1[backURL]=###RETURN_URL###&redirect_url=###RETURN_URL###

#"menu of these pages"
tt_content.menu.20.default.1{
showAccessRestrictedPages = NONE
showAccessRestrictedPages.addParams=&tx_srfeuserregister_pi1[backURL]=###RETURN_URL###&redirect_url=###RETURN_URL###
}


--------------------------------------------
Riccardo De Contardi - Web Developer
B Human Srl - www.bhuman.it
Via Canzio, 15 - 20131 Milano
TEL +39-02-20.23.271 - FAX +39-02-20.240.561
--------------------------------------------


-----Messaggio originale-----
Da: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-bounces at lists.typo3.org] Per conto di Lorenz Ulrich
Inviato: venerdì 11 marzo 2011 13:27
A: typo3-english at lists.typo3.org
Oggetto: [TYPO3-english] Handling of deep linking to protected pages

Hi everyone

I need some advice in a use-case with protected pages.

I have a mixed setup with pages that need to be protected, while other pages are open to public, for example:

- [1] Main page with login form (public)
-- [2] Subpage 1 (protected)
-- [3] Subpage 2 (public)

I would like to have deep linking to the protected subpages:

"An overview about all your inscriptions can be found on <www.mypage.com/index.php?id=2>"

If the user is not logged in in FE, he should be redirected to the main page [1]. After logging in he should be redirected to page page he originally visited [2].


By default, TYPO3 ([FE][pageNotFound_handling] empty) would show the content of [1] if the user calls [2] ("The next visible page upwards in the page tree is shown."). So he would see the login form but after login he is not redirected.

If the PageNotFound handling is activated ([FE][pageNotFound_handling] = 1), TYPO3 will throw a 404 error. This is good for pages that don't exist but bad for pages that are only access protected.


How would you handle this case? Writing a user function that makes a difference between access protected and not existing pages and then either redirect to the 404 page or to the login page? Would that be a useful feature in general/a valid feature request?


Thanks for sharing your opinion.


Lorenz
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

**************************************************

Chi riceve il presente messaggio e' tenuto a verificare se lo stesso non gli sia pervenuto per errore. In tal caso e' pregato di avvisare immediatamente il mittente e, tenuto conto delle responsabilita connesse all'indebito utilizzo e/o divulgazione del messaggio e/o delle informazioni in esso contenute, voglia cancellare l'originale e distruggere le varie copie o stampe.

The receiver of this message is required to check if he/she has received it erroneously. If so, the receiver is requested to immediately inform the sender and - in consideration of the responsibilities arising from undue use and/or disclosure of the message and/or the information contained therein - destroy the original message and any copy or printout thereof.




More information about the TYPO3-english mailing list