Forums / Developer / Setting user role based on IP address
Newbie Girl
Wednesday 26 April 2006 1:48:00 am
I have obtained my users IP address in the "pagelayout.tpl", and based on the IP address I should tell EZ that the user is of a special user group so that the user is automatically logged in and do not have to log in manually. Do anyone have any suggestions on how to tell eZ that my user is of a special user group so that he/she automatically is logged in?
I would be very glad to here some suggestions (newbie in this game...:) )
Kristof Coomans
Wednesday 26 April 2006 3:51:41 am
With the Single Sign On handler plugin system this could be easily accomplished. It will be included in eZ publish 3.8 ( http://pubsvn.ez.no/nextgen/trunk/doc/features/3.8/single_sign_on_handler.txt )
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
Wednesday 26 April 2006 4:19:30 am
Thank you very much for answering me!
Unfortunately, I have to program this on eZ 3.7.2 on a project going on right now, so I have to figure out a different way to do this. Would be very glad to here more on alternative solutions :)
I am thinking on writing a Javascript in my "Pagelayout.tpl" that automatically sends in username/password, but I am not really confident if this is right solution.
Wednesday 26 April 2006 4:46:57 am
You could try to backport the Single Sign On plugin system to eZ 3.7 ;-) It was committed on the trunk in SVN rev. 15462, and you only have to modify one kernel file, so I guess it's the most ez way.
Good luck!
Łukasz Serwatka
Wednesday 26 April 2006 5:45:56 am
I can confirm that SSO works with 3.7 after applying the patch. You can generate patch by running
svn diff -r 15461:15462
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Tuesday 02 May 2006 12:10:16 am
Thank you both very much for answering me! :)
Siniša Šehović
Wednesday 10 May 2006 9:00:18 am
Hi Lukasz
I don't se SSO handlers on trunck?
How can I get it?
S.
--- If at first you don't succeed, look in the trash for the instructions.