From 559267d660f41e2e0f1119e59d4350be48071923 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Wed, 2 Mar 2016 19:13:50 +0000 Subject: nms: Tweak switches.pl and add switch-state.pl --- include/nms/web.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/nms/web.pm b/include/nms/web.pm index af3f8b7..2b39911 100755 --- a/include/nms/web.pm +++ b/include/nms/web.pm @@ -61,6 +61,13 @@ sub setwhen { return $when; } +sub ispublic() { + if (defined($get_params{'public'}) || $ENV{'REMOTE_USER'} eq "public") { + return 1; + } else { + return 0; + } +} # Sets the ifname. If we are logged in, it's simply set to "ifname", otherwise # it's hashed for anonymization. sub obfuscateifname { -- cgit v1.2.3