denied content force login and redirect to the original page

Moderators: mandville, PhilD, General Support Moderators

dschafer
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Jul 19, 2011 5:42 pm

denied content force login and redirect to the original page

Postby dschafer » Thu Sep 24, 2015 5:47 pm

I feel like I'm missing something.

I've read about restricting content via the ACL but I haven't seen word one about the recommended approach for reacting to denied content.

I have content that is denied to the public and sure enough, a non-logged in user is denied access. Unfortunately the user will just see a blank page.

What I'd like to have happen is the user presented with a login, then after the login the return to the originally requested page. I know I must be missing something. If someone could point me to the best approach to resolve this, I'd greatly appreciate it.

Thx.

dschafer
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Jul 19, 2011 5:42 pm

Re: denied content force login and redirect to the original

Postby dschafer » Fri Sep 25, 2015 9:41 pm

I've implemented a redirect to the login page in the com_content articles view. I used the return= technique to let the login page know where to go after logging in.

I understand why and how these mechanisms work. Given the elaborate apparatus Joomla has for ACL/Usergroups it still seems like hacking the core code wouldn't be the best choice. Does anyone have a more graceful approach?

User avatar
rcarey
Joomla! Explorer
Joomla! Explorer
Posts: 469
Joined: Sat Apr 25, 2009 9:20 pm
Location: Minnesota (USA)
Contact:

Re: denied content force login and redirect to the original

Postby rcarey » Tue Sep 29, 2015 2:52 pm

If you implemented your redirection in the view's template file, then that is not hacking the core.

Keep in mind the user's experience. If the user is taken immediately to a login page, that user might be confused as to why they see a login and not the content. If the user sees the blank content area except for a message that he/she needs to login to view this content, and then have a link to the login page, that might be a better user experience.

You might have accounted for this. Keep in mind that if it is possible that a user can be logged in yet still not have credential to access to the content, the code ought to distinguish between this scenario and the non-logged-in scenario - and produce the appropriate user experience for each scenario.
Randy Carey, the iCue Project http://iCueProject.com : developing an intelligent approach to improving the CMS user experience,
Careytech Studios http://careytech.com custom development for tailored or value-added web solutions


Return to “Access Control List (ACL) in Joomla! 2.5”

Who is online

Users browsing this forum: No registered users and 2 guests