aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AdminPanel/Module/Services.pm
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-09-03 22:04:21 +0200
committerAngelo Naselli <anaselli@linux.it>2014-09-03 22:04:21 +0200
commit42a76317b5c58d028c113217a9e0460274c1bd69 (patch)
tree84ce7dce3d859b3b7dcb6b445c1f7d4c825c164e /lib/AdminPanel/Module/Services.pm
parentcee8eedf86e78a7cfa634a519fb0f69623718545 (diff)
downloadcolin-keep-42a76317b5c58d028c113217a9e0460274c1bd69.tar
colin-keep-42a76317b5c58d028c113217a9e0460274c1bd69.tar.gz
colin-keep-42a76317b5c58d028c113217a9e0460274c1bd69.tar.bz2
colin-keep-42a76317b5c58d028c113217a9e0460274c1bd69.tar.xz
colin-keep-42a76317b5c58d028c113217a9e0460274c1bd69.zip
Added a dialog to prevent not root user running
Diffstat (limited to 'lib/AdminPanel/Module/Services.pm')
-rw-r--r--lib/AdminPanel/Module/Services.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/AdminPanel/Module/Services.pm b/lib/AdminPanel/Module/Services.pm
index e8c5fc2..006ca49 100644
--- a/lib/AdminPanel/Module/Services.pm
+++ b/lib/AdminPanel/Module/Services.pm
@@ -58,6 +58,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
use Moose;
use strict;
+use English;
use MDK::Common::String qw(formatAlaTeX);
use MDK::Common::DataStructure qw(member);
@@ -228,6 +229,14 @@ sub BUILD {
sub start {
my $self = shift;
+ if ($EUID != 0) {
+ $self->sh_gui->warningMsgBox({
+ title => $self->name,
+ text => $self->loc->N("root privileges required"),
+ });
+ return;
+ }
+
$self->_servicePanel();
};