From: hickert Date: Fri, 12 Jan 2007 04:20:02 +0000 (+0000) Subject: Updated terminal startup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2b8c085aacdfbc8af1fceab6629042a24f4af7a8;p=gosa.git Updated terminal startup git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5543 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc index 596cf2baf..d5894c839 100644 --- a/plugins/admin/systems/class_terminalStartup.inc +++ b/plugins/admin/systems/class_terminalStartup.inc @@ -151,12 +151,18 @@ class termstartup extends plugin function execute() { - /* Call parent execute */ - plugin::execute(); + /* Call parent execute */ + plugin::execute(); /* Do we need to flip is_account state? */ if (isset($_POST['modify_state'])){ - $this->is_account= !$this->is_account; + + /* Only change account state if allowed */ + if($this->is_account && $this->acl == "#all#"){ + $this->is_account= !$this->is_account; + }elseif(!$this->is_account && chkacl($this->acl,"create") == ""){ + $this->is_account= !$this->is_account; + } } /* Do we represent a valid terminal? */ @@ -195,7 +201,7 @@ class termstartup extends plugin /* if $_POST['gotoShareAdd'] is set, we will try to add a new entry * This entry will be, a combination of mountPoint and sharedefinitions */ - if(isset($_POST['gotoShareAdd'])){ + if(isset($_POST['gotoShareAdd']) && chkacl($this->acl,"gotoShare") == ""){ /* We assign a share to this user, if we don't know where to mount the share */ if((!isset($_POST['gotoShareMountPoint']))||(empty($_POST['gotoShareMountPoint']))||(preg_match("/[\|]/i",$_POST['gotoShareMountPoint']))){ print_red(_("You must specify a valid mount point.")); @@ -211,7 +217,7 @@ class termstartup extends plugin /* if the Post gotoShareDel is set, someone asked GOsa to delete the selected entry (if there is one selected) * If there is no defined share selected, we will abort the deletion without any message */ - if((isset($_POST['gotoShareDel']))&&(isset($_POST['gotoShare']))){ + if((isset($_POST['gotoShareDel']))&&(isset($_POST['gotoShare'])) && chkacl($this->acl,"gotoShare") == ""){ unset($this->gotoShares[$_POST['gotoShare']]); } @@ -242,6 +248,10 @@ class termstartup extends plugin $use = " checked "; }; + if(chkacl($this->acl,"gotoLdapServer") == ""){ + $use.= " disabled "; + } + $SelectBoxLdapServer->AddEntry( array( array("string"=>"", diff --git a/plugins/admin/systems/terminalStartup.tpl b/plugins/admin/systems/terminalStartup.tpl index 6a5d38f02..55f7de155 100644 --- a/plugins/admin/systems/terminalStartup.tpl +++ b/plugins/admin/systems/terminalStartup.tpl @@ -52,7 +52,7 @@

{t}Kernel modules (format: name parameters){/t}

- {html_options values=$gotoModules output=$gotoModules}