aboutsummaryrefslogtreecommitdiffstats
path: root/include/nms/web.pm
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2016-03-02 19:13:50 +0000
committerKristian Lyngstol <kly@kly.no>2016-03-02 19:13:50 +0000
commit559267d660f41e2e0f1119e59d4350be48071923 (patch)
tree492c96a5b966b5fc1a2421f04c8c2271e5a643cd /include/nms/web.pm
parentfb47ad1cd7c8b7aabe6098ca0d092df5e698b691 (diff)
nms: Tweak switches.pl and add switch-state.pl
Diffstat (limited to 'include/nms/web.pm')
-rwxr-xr-xinclude/nms/web.pm7
1 files changed, 7 insertions, 0 deletions
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 {