This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Link protection with PIN?
#1
Hi,

I need for a project a PIN Protection on an internal link. Is this possible?

I mean the same dialog like the protection on an KNX Object in Visu.

I use a spaceLYnk with 2.0.1 Fw.

thx forwards
Reply
#2
Set Additional classes of your element to mylink, add this code to custom JavaScript (change pin from 1234 and URL as needed):
Code:
$(function(){
  $('.mylink').off('vclick').on('vclick', function(e) {
    showPincode('1234', {
      callback: function() {
        window.location = 'https://forum.logicmachine.net/';
      }
    });
    
    return $.stopEvent(e);
  });
});
Reply
#3
Hi Admin,

thx for your help, but do you shure that the SL with Fw 2.0.1 has the possibility to add custom javascript? 

If yes, I can't find the correct position to set the code...

Here a screenshot from my menu bar:

   

Sorry... I found it....

Thank you, it works, but now I need the correct URL I've to use for the script.
The whole URL is like: http://192.168.110.117/scada-vis/#3 and the link is set on http://192.168.110.117/scada-vis/#2

If I use the URL http://192.168.110.117/scada-vis/#3 in the custom JS, then it opens the whole page and needs new password :-(
It should work like the build-in "link to" function.

Can you help me again, please?
Reply
#4
If you want to protect a certain plan or level you can just set PIN in Vis. structure
Reply
#5
Thank you, that is exactly what I'm looking for :-)
It's just build-in  Big Grin Smile Smile
Reply
#6
Hi there , i need this function for my link to certain page but i dont want tu use PIN in VisStructure. Can you update Javascript for a page ID instead of external link.

$(function(){
  $('.mylink').off('vclick').on('vclick', function(e) {
    showPincode('1234', {
      callback: function() {
        window.location = 'https://forum.logicmachine.net/';
      }
    });
    
    return $.stopEvent(e);
  });
});
Reply
#7
This example will not work with the latest firmware. For security reasons PIN check is done on the server side so a custom check like this is not possible anymore.
Reply


Forum Jump: