summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c1b8ebc)
raw | patch | inline | side by side (parent: c1b8ebc)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 15 Jan 2007 05:18:05 +0000 (05:18 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 15 Jan 2007 05:18:05 +0000 (05:18 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5554 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_glpiAccount.inc b/plugins/admin/systems/class_glpiAccount.inc
index 9ff5019138a6059b2d135fd975a33db5767d911d..329a3bf080eaa36bd6204638c7a5aa63e3701a23 100644 (file)
/* Add Device was requested, open new dialog
*/
- if(isset($_POST['AddDevice'])){
+ if(isset($_POST['AddDevice']) && chkacl($this->acl,"usedDevices") == ""){
$this->dialog =true;
$this->cur_dialog = new glpiDeviceManagement($this->config,$this->dn,$this->usedDevices);
}
/* Attachment pool was closed with use
*/
- if(isset($_POST['UseAttachment'])){
+ if(isset($_POST['UseAttachment']) && chkacl($this->acl,"usedAttachments") == ""){
if(count($this->cur_dialog->check())){
foreach($this->cur_dialog->check() as $msg){
print_red($msg);
*/
$once = true;
foreach($_POST as $name => $value){
- if((preg_match("/^delAttachment_/",$name))&&($once)){
+ if((preg_match("/^delAttachment_/",$name))&&($once) && chkacl($this->acl,"usedAttachments") == ""){
$once= false;
$name = preg_replace("/^delAttachment_/","",$name);
$entry = preg_replace("/_.*$/","",$name);
}
}
}
- if((isset($_POST['RemoveAttachment']))&&(isset($_POST['Attachments']))){
+ if((isset($_POST['RemoveAttachment']))&&(isset($_POST['Attachments'])) && chkacl($this->acl,"usedAttachments") == ""){
foreach($_POST['Attachments'] as $entry){
if(isset($this->usedAttachments[$entry])){
unset($this->usedAttachments[$entry]);
/* System type management
*/
- if(isset($_POST['edit_type'])){
+ if(isset($_POST['edit_type']) && chkacl($this->acl,"type") == ""){
$this->dialog = true;
$this->edit_type=true;
}
/* This appends a new system to our sytem types
*/
- if((isset($_POST['add_type']))&&(!empty($_POST['type_string']))){
+ if((isset($_POST['add_type']))&&(!empty($_POST['type_string'])) && chkacl($this->acl,"type") == ""){
$attr = $this->handle->getSystemTypes();
if(in_array(trim($_POST['type_string']),$attr)){
print_red(_("Adding new sytem type failed, this system type name is already used.")) ;
/* Remove selected type from our system types list
*/
- if((isset($_POST['del_type']))&&(!empty($_POST['select_type']))){
+ if((isset($_POST['del_type']))&&(!empty($_POST['select_type'])) && chkacl($this->acl,"type") == ""){
$tmp = $this->handle->is_systemTypeUsed($_POST['select_type']);
if(count($tmp)){
$names = "";
}
- if((isset($_POST['rename_type'])&&(!empty($_POST['select_type'])))||($this->renameTypeDialog)){
+ if((isset($_POST['rename_type'])&&(!empty($_POST['select_type'])))||($this->renameTypeDialog) && chkacl($this->acl,"type") == ""){
if(isset($_POST['select_type'])){
$this->select_type = $_POST['select_type'];
}
/* System os management
*/
- if(isset($_POST['edit_os'])){
+ if(isset($_POST['edit_os']) && chkacl($this->acl,"os") == ""){
$this->dialog = true;
$this->edit_os=true;
}
/* Add new os to the db
*/
- if((isset($_POST['add_os']))&&(!empty($_POST['is_string']))){
+ if((isset($_POST['add_os']))&&(!empty($_POST['is_string'])) && chkacl($this->acl,"os") == ""){
$attr = $this->handle->getOSTypes();
if(in_array(trim($_POST['is_string']),$attr)){
print_red(_("Adding new operating system failed, specifed name is already used.")) ;
/* Delete selected os from list and db
*/
- if((isset($_POST['del_os']))&&(!empty($_POST['select_os']))){
+ if((isset($_POST['del_os']))&&(!empty($_POST['select_os'])) && chkacl($this->acl,"os") == ""){
$tmp = $this->handle->is_osUsed($_POST['select_os']);
if(count($tmp)){
$this->renameOSDialog = false;
}
}
- if((isset($_POST['rename_os'])&&(!empty($_POST['select_os'])))||($this->renameOSDialog)){
+ if((isset($_POST['rename_os'])&&(!empty($_POST['select_os'])))||($this->renameOSDialog) && chkacl($this->acl,"os") == ""){
if(isset($_POST['select_os'])){
$this->select_type = $_POST['select_os'];
}
/* Open dialog to edit os types
*/
- if($this->edit_os){
+ if($this->edit_os && chkacl($this->acl,"os") == ""){
$smarty->assign("Method","edit");
$smarty->assign("OSs", $this->handle->getOSTypes());
$smarty->assign("OSKeys", array_flip($this->handle->getOSTypes()));
/* Show dialog to select a new contact person
* Select a contact person
*/
- if(isset($_POST['SelectContactPerson'])){
+ if(isset($_POST['SelectContactPerson']) && chkacl($this->acl,"user_tech_num") == ""){
$this->addUser = "contact";
$this->cur_dialog= new glpiSelectUser($this->config,$this->dn,"user_tech_num");
}
/* Open dialog which allows to edit the manufacturers
*/
- if(isset($_POST['edit_manufacturer'])){
+ if(isset($_POST['edit_manufacturer']) && chkacl($this->acl,"user_tech_num") == ""){
$this->cur_dialog = new glpiManufacturer($this->config,$this->dn);
$this->dialog = true;
}
/* Selecte technical responsible person
*/
- if(isset($_POST['SelectTechPerson'])){
+ if(isset($_POST['SelectTechPerson']) && chkacl($this->acl,"user_tech_num") == ""){
$this->addUser ="tech";
$this->cur_dialog= new glpiSelectUser($this->config,$this->dn,"user_tech_num");
}
/* Technical responsible person selected*/
- if(isset($_GET['act'])&&($_GET['act']=="user_tech_num")){
+ if(isset($_GET['act'])&&($_GET['act']=="user_tech_num") && chkacl($this->acl,"user_tech_num") == ""){
/* Get posted id */
$id = base64_decode($_GET['id']);
}
/* 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;
+ $this->is_modified = true;
+ }elseif(!$this->is_account && chkacl($this->acl,"create") == "" ){
+ $this->is_account= !$this->is_account;
+ $this->is_modified = true;
+ }
}
/* Show tab dialog headers */
return ;
}
plugin::save_object();
- foreach($this->attributes as $attrs){
- if(isset($_POST[$attrs])){
- $this->$attrs = stripslashes ($_POST[$attrs]);
- }
- }
}
index c109d44a6fa2d4fbf5d92be5a5ce1a1c69f74223..2a27325ddfbe8db08f79cd97a098851fa0d94549 100644 (file)
/* 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;
+ $this->is_modified = true;
+ }elseif(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $this->is_account= !$this->is_account;
+ $this->is_modified = true;
+ }
}
if ($this->is_account){
/* Add empty new zone
*/
- if(isset($_POST['AddZone'])){
+ if(isset($_POST['AddZone']) && chkacl($this->acl,"servdns") == ""){
$this->dialog = new servdnseditZone($this->config,$this->dn);
}
/* check all post for edit request
*/
- if(preg_match("/^editZone_/",$name)&&!$once){
+ if(preg_match("/^editZone_/",$name)&&!$once && chkacl($this->acl,"servdns") == ""){
$once =true;
$tmp = preg_replace("/^editZone_/","",$name);
$tmp = base64_decode(preg_replace("/_.*$/","",$tmp));
/* check posts for delete zone
*/
- if(preg_match("/^delZone_/",$name)&&!$once){
+ if(preg_match("/^delZone_/",$name)&&!$once && chkacl($this->acl,"servdns") == ""){
$once =true;
$tmp = preg_replace("/^delZone_/","",$name);
array("string" =>str_replace("%s",base64_encode($zone),$editImg))
));
}
-
+
+ $smarty->assign("servdnsACL",chkacl($this->acl,"servdns"));
+
/* Display tempalte
*/
$smarty->assign("ZoneList",$ZoneList->DrawList());
index ba53940884ad9bea5ff698678f0acbfe23ca6023..7cd08b7d945285fcd47264cd33c4aaa50d54a4fb 100644 (file)
<tr>
<td style="width:100%;vertical-align:top;">
{$ZoneList}
- <input type="submit" name="AddZone" value="{t}Add{/t}">
- <input type="submit" name="EditZone" value="{t}Edit{/t}">
- <input type="submit" name="RemoveZone" value="{t}Remove{/t}">
+ <input type="submit" name="AddZone" value="{t}Add{/t}" {$servdnsACL}>
+ <input type="submit" name="EditZone" value="{t}Edit{/t}" {$servdnsACL}>
+ <input type="submit" name="RemoveZone" value="{t}Remove{/t}" {$servdnsACL}>
</td>
</tr>
</table>
index a457f171ecba644628fb9df20e076c61db0b8f9c..d8540b7660304a6d5633f688315fb263ded6c500 100644 (file)
<tr>
<td style="vertical-align:top; border-right:1px solid #A0A0A0; padding-right:5px;" width="50%">
- <input type=checkbox name="goShareServer" value="1" {$goShareServer} {$goExportEntryACL}
+ <input type=checkbox name="goShareServer" value="1" {$goShareServer}
onchange="changeState('goExportEntry');
changeState('NewNfsEditId');
changeState('DelNfsEntId');
<table summary="" style="width:100%">
<tr>
<td>
- <select style="width:100%" id="goExportEntry" name="goExportEntryList[]" {$goExportEntryACL} {$goShareServerState} size=12 multiple >
+ <select style="width:100%" id="goExportEntry" name="goExportEntryList[]" {$goShareServerState} size=12 multiple >
{html_options values=$goExportEntry output=$goExportEntryKeys}
<option disabled> </option>
</select>