Quantcast
Viewing all articles
Browse latest Browse all 197

Login-Form should be invisible when IP-rage is wrongNo login-process should bepossible from wrong IP

I work with typo3 7.6 LTS and some extensions do not work any more. On some pages I have a FE-Login-Form to login to some pages to be seen after fe-login.

Now, I would like to restrict the login process to a certain IP-range from which it is initiated. The deprecated extension helped to realize this by not displaying the login-content-element in the frontend when the page had been called from the wrong ip-range. Being called from the right IP-range the login-form will be displayed and the login-process maybe initiated.

After some hours looking and trying nonsense I got a shabby solution. I add a template expansion on the page where the login-form should be displayed/not-displayed. And this code:

[TS]
[IP = *.*.*.*]
plugin.tx_felogin_pi1._CSS_DEFAULT_STYLE (
    .tx-felogin-pi1  form, input {
        display: none;
    }
)
[end]

[IP = x.y.*.*]
plugin.tx_felogin_pi1._CSS_DEFAULT_STYLE (
    .tx-felogin-pi1  form, input {
        display: block;
    }
)
[end]
[/TS]

This works for the html-code of the form-tag. It is simply turned off by css. Shabby!

Does anybody have an idea more elegant?


Viewing all articles
Browse latest Browse all 197