For me (superuser) the module works seamlessly, as for every other user of the site... a little odd. I've configured it to lock sessions after 10 minutes of inactivity, and it certainly does so, but normal users get a simple permission denied screen instead of the request to type their password again. The only solution they have to use the site again is to clear cookies.

Comments

chertzog’s picture

The problem was that the lock session page had the path "admin/lock_session/login" and unless users have access to administration pages, they get a 403 error.

Here is a patch that removes the admin path, and adds a configuration setting to choose what roles should have their sessions locked.

The patch also corrects some grammatical errors, adds descriptions, removes a bunch of extraneous help comments, and corrects the module name in the info file. (That one threw me for a loop, when i went looking for "Lock Session" in the module list.)

This is against the Alpha release. I took a look at the dev release, and dont really know whats going on with it. The main functions have been removed and put into a plugin file for password policy.... which would require a dependency on that module.

But i have tested this patch with the alpha release and have found it pretty stable. Let me know of any issues.

nikemen’s picture

Thanks! Well, I simply applied the patch and went to the configuration again, selected all roles and waited some minutes to test. Now I get a 404 error instead of the 403. The path given is http://my-site.org/?q=en/lock_session/login and the answer I get is:

Page not found
The requested page "/?q=en/lock_session/login" could not be found.

chertzog’s picture

Do you have some sort of multi-lingual settings? the "en" at the beginning of the query path makes it look like you do. If so, im not sure how to handle that. I will have to do some digging.

Also did you clear all caches?

Try going to just

?q=lock_session/login

instead of
?q=en/lock_session/login

nikemen’s picture

My wrong, sorry. I've now wiped the caches and it works fine. The site runs in 5 languages, yes, but apparently it has nothing to do. Thanks for your help!