You are here: Foswiki>Tasks Web>Item10553 (03 Oct 2015, SvenDowideit)Edit Attach

Item10553: JoomlaUsersContrib facing issue after Joomla session time out

pencil
Priority: Urgent
Current State: Needs Developer
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: JoomlaUsersContrib
Branches:
Reported By: RajeshBamniya
Waiting For:
Last Change By: SvenDowideit
Hi When our Joomla Session time out foswiki session still shows active and allow wikiguest to edit topic instead of joomla logged in user. is there any way to make both session expired on same time or any other solution which may help?

Thanks Rajesh

-- RajeshBamniya - 28 Mar 2011

interesting frown, sad smile so it actually saves the edit as WikiGuest? that's quite a surprise - I'll have to look into that!

-- SvenDowideit - 28 Mar 2011

Actually this is in case if i am using LocalConfig setting $Foswiki::cfg{AuthScripts} = ''; otherwise it is taking me to Wiki Login Screen and that is the exact problem.

-- RajeshBamniya - 28 Mar 2011

mmmm, that sounds like you're expecting something JoomlaUsersContrib can't do.

first up: if you set $Foswiki::cfg{AuthScripts} = ''; then JoomlaUsersContrib does not do anything to stop the guest user from editing - so anyone not logged into joomla (as is the case when the joomla users' session expires) is premitted to edit.

this is not what you want to do.

you need to reset the AuthScript back to the default to ensure that authentication is required to edit.

secondly, what is the problem with being taken to the WikiLogin screen when there is no existing joomla login? that will then allow the user to enter their joomla user and password, and continue on.

We could do some work to add a new configuration setting to JoomlaUsersContrib to take the user to a joomla login page - but that is a (small) bespoke customisation project)

-- SvenDowideit - 29 Mar 2011

Sven, I am from the same organization that Rajesh is working with and I have also sent an email to you for this. The login from Wiki using the Joomla credentials working good. But, our client needs to have the Joomla login screen (main application login screen) when there is a need to show a login. Can you please let us know how much will be the effort from your end to add a config paramterer for the JoomlaUserContrib plugin that will call the custom login URL (that we will set in the parameter) when there is no Joomla login session found? I am also open to provide a financial support to this customization.

Please let me know.

Thanks!

-- AnupamSaha - 29 Mar 2011

I hope to look at this on the w/e - i'm having trouble finding spare time, but its a good idea that we implemented in the DrupalUsersContrib too

-- SvenDowideit - 30 Mar 2011

Thanks Sven. Is there any FosWiki extension available to notify (e.g. session_time_out - x secs; where x seconds is configurable) before a session timeout occur? User might see the notification and will have the option to reset the session.

-- AnupamSaha - 30 Mar 2011

Sven - After studying DrupalUsersContrib, I have added the following into Config.spec:

# *BOOLEAN* # Over-ride Foswiki authentication using only the Joomla sessions # If there is no Joomla Session cookie, Foswiki will use the Guest user. # NOTE: you will need to specify a Joomla Login UI URL for Foswiki to redirect to to authenticate $Foswiki::cfg{Plugins}{JoomlaUser}{JoomlaAuthOnly} = $FALSE;

# *STRING 150* # Joomla Login UI URL for Foswiki to redirect to to authenticate - used if JoomlaAuthOnly is set to true $Foswiki::cfg{Plugins}{JoomlaUser}{JoomlaAuthURL} = '';

And also, added the following into the JoomlaLogin.pm:

=begin TML

ObjectMethod loginUrl () -> $loginUrl

over-ride the login url

=cut

sub loginUrl { my $this = shift;

if ($Foswiki::cfg{Plugins}{JoomlaUser}{JoomlaAuthOnly}) { return $Foswiki::cfg{Plugins}{JoomlaUser}{JoomlaAuthURL}; } else { return $this->SUPER::loginUrl(); } }

We could see the Joomla login screen through the custom url config. But, sometimes, when Joomla session timed out, clicking on "Cancel" from a topic edit window, we could see the Foswiki login screen.

Can you please review and let me know whether the changes are correct or not?

Thanks!

-- AnupamSaha - 30 Mar 2011

sounds pretty right - do you have commit access for foswiki's subversion repo?

I'd be happy for you to commit what you have smile

see RequestAccessToSubversion

(i recon your fix is good - we might have to see if there is a bug in the way the cancel works?)

-- SvenDowideit - 31 Mar 2011

Thanks Sven for reviewing this. I have sent you an email with the updated files.

-- AnupamSaha - 01 Apr 2011

Hi Sven

we just enabled mail notification's and it is working from browser running bin/rest/MailerContribPlugin/notify

but i have to set this up from cron and when i run tools/mailnotify got this error:- Can't locate object method "fetch" via package "CGI::Cookie" at /var/www/www.host.com/foswiki/lib/Foswiki/LoginManager/JoomlaLogin.pm line 64.

or is there any way to run browser script from cron i have the root access on server?

Please suggest

-- RajeshBamniya - 12 Apr 2011

Heya, I've uploaded a new version of the contrib that contains your changes and a fix for the mailnotify issue.

Sven

-- SvenDowideit - 20 Apr 2011

Hi sven

I tried upgrading to new version from installer but end up with Error:- ******************************************************** Could not load /home/local/foswiki/tools/extender.pl There was a compile error: Can't use string ("this") as a HASH ref while "strict refs" in use at /home/local/foswiki/lib/Foswiki/LoginManager.pm line 269. Error when trying to eval the file content: Can't use string ("this") as a HASH ref while "strict refs" in use at /home/local/foswiki/lib/Foswiki/LoginManager.pm line 269.
and after manually extracted plug in to wiki folder when tried to run command from shell perl -I bin tools/mailnotify Error:- Can't use string ("this") as a HASH ref while "strict refs" in use at /home/local/foswiki/lib/Foswiki/LoginManager.pm line 269.

Please look into this

-- RajeshBamniya - 21 Apr 2011

Hi Sven

any updates

Rajesh

-- RajeshBamniya - 28 Apr 2011

Hi sven and Rajesh, I have the same error than sven when I am trying to install an extension or to launch kinoupdate. Do you have any solution? Thank you. David

-- DavidPetit - 19 Jun 2011

Hi David copy joomlalogin.pm from foswiki.1.1.2. newer version of this is creating problem.

-- RajeshBamniya - 09 Jan 2012
 
Topic revision: r23 - 03 Oct 2015, SvenDowideit
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy