From 84d022a13f67959b7a8d8cbb8d7f770e3f731f63 Mon Sep 17 00:00:00 2001 From: Mikael Nordin Date: Fri, 19 Aug 2016 14:16:13 +0200 Subject: [PATCH] With auth --- lib/Thruk/Controller/hello.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Thruk/Controller/hello.pm b/lib/Thruk/Controller/hello.pm index caeee2d..0ab575d 100644 --- a/lib/Thruk/Controller/hello.pm +++ b/lib/Thruk/Controller/hello.pm @@ -22,6 +22,12 @@ This is the entry point for thruk to start the plugin sub index { my ( $c ) = @_; + + return unless Thruk::Action::AddDefaults::add_defaults($c, Thruk::ADD_CACHED_DEFAULTS); + if( !$c->check_user_roles("authorized_for_configuration_information") || !$c->check_user_roles("authorized_for_system_commands")) { + return $c->detach('/error/index/8'); + } + $c->stash->{title} = 'Hello World!'; $c->stash->{'subtitle'} = 'Hello World!'; $c->stash->{'infoBoxTitle'} = 'Hello World!';