diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index 4c25e5fb83cdf8aa8b02f8615208576279bbf30e..86e394bb88bef34fb4f58ab3b4d038b88b370646 100644 (file)
plugin::execute();
/* Do we need to flip is_account state? */
- if (isset($_POST['modify_state'])){
- $this->is_account= !$this->is_account;
+ if(isset($_POST['modify_state'])){
+ if($this->is_account && $this->acl_is_removeable()){
+ $this->is_account= FALSE;
+ }elseif(!$this->is_account && $this->acl_is_createable()){
+ $this->is_account= TRUE;
+ }
}
- if (isset($_POST['action'])){
+ if ((isset($_POST['action'])) && ($this->acl_is_writeable("FAIstate"))){
$cmd= search_config($this->config->data['TABS'], "workgeneric", "ACTIONCMD");
if ($cmd == ""){
print_red(_("No ACTIONCMD definition found in your gosa.conf"));
/* Base select dialog */
$once = true;
foreach($_POST as $name => $value){
- if(preg_match("/^chooseBase/",$name) && $once){
+ if(preg_match("/^chooseBase/",$name) && $once && $this->acl_is_writeable("base")){
$once = false;
$this->dialog = new baseSelectDialog($this->config,$this);
$this->dialog->setCurrentBase($this->base);
}
/* Add new ntp Server to our list */
- if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers']))){
+ if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers'])) && $this->acl_is_writeable("gotoNtpServer")){
$this->gotoNtpServer[$_POST['gotoNtpServers']] = $_POST['gotoNtpServers'];
}
/* Delete selected NtpServer for list of used servers */
- if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected']))){
+ if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected'])) && $this->acl_is_writeable("gotoNtpServer")){
foreach($_POST['gotoNtpServerSelected'] as $name){
unset($this->gotoNtpServer[$name]);
}