summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d0e09c1)
raw | patch | inline | side by side (parent: d0e09c1)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Jan 2007 11:04:16 +0000 (11:04 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Jan 2007 11:04:16 +0000 (11:04 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5533 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/ogroups/class_divListOGroup.inc b/plugins/admin/ogroups/class_divListOGroup.inc
index a40237facd07a3df3157b04090f85515199132c2..52693207f04586c6c1f5db4b2419021b72049821 100755 (executable)
{
/* Add Copy & Paste buttons if copy&paste is enabled
*/
- /* Create action icons */
- $actions = "";
- if($this->parent->CopyPasteHandler){
- $actions.= "<input class='center' type='image'
- src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
- $actions.= "<input class='center' type='image'
- src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
- }
- $actions.= "<input class='center' type='image'
- src='images/edit.png' alt='"._("edit")."' name='group_edit_%KEY%' title='"._("Edit this entry")."'>";
- $actions.= "<input class='center' type='image'
- src='images/edittrash.png' alt='"._("delete")."' name='group_del_%KEY%' title='"._("Delete this entry")."'>";
-
// Defining Links
$linkopen = "<a href='?plug=".$_GET['plug']."&act=dep_open&dep_id=%s'>%s</a>";
$editlink = "<a href='?plug=".$_GET['plug']."&id=%s&act=edit_entry'>%s</a>";
// Assigning ogroups
foreach($list as $key => $val){
+ $acl= get_permissions ($val['dn'], $this->ui->subtreeACL);
+ $acl= get_module_permission($acl, "ogroup", $val['dn']);
+
+ /* Create action icons */
+ $actions = "";
+ if($this->parent->CopyPasteHandler && $acl == "#all#"){
+ $actions.= "<input class='center' type='image'
+ src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
+ $actions.= "<input class='center' type='image'
+ src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
+ }
+ $actions.= "<input class='center' type='image'
+ src='images/edit.png' alt='"._("edit")."' name='group_edit_%KEY%' title='"._("Edit this entry")."'>";
+
+ if(chkacl($acl,"delete") == ""){
+ $actions.= "<input class='center' type='image'
+ src='images/edittrash.png' alt='"._("delete")."' name='group_del_%KEY%' title='"._("Delete this entry")."'>";
+ }
+
if(isset($val['mail'])){
$mail = $mailimg;
}else{
diff --git a/plugins/admin/ogroups/class_mailogroup.inc b/plugins/admin/ogroups/class_mailogroup.inc
index 560e4653ca0dba81d43432618fb468505491b251..3dd55699d624f5055858ff9f73875ebffac1ab15 100644 (file)
/* Call parent execute */
plugin::execute();
+
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
- $this->is_account= !$this->is_account;
+
+ /* Onyl 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;
+ }
}
/* Show tab dialog headers */
index 1f9b454ab01c091d3fd4bb2b55b880dc643d6108..b5366a941636d202abce482d3495bc02bd01cf9d 100644 (file)
$this->reload();
}else{
/* Delete objects from group */
- if (isset($_POST['delete_membership']) && isset($_POST['members'])){
+ if (isset($_POST['delete_membership']) && isset($_POST['members']) && chkacl($this->acl,"gosaGroupObjects") == ""){
foreach ($_POST['members'] as $value){
$this->objects["$value"]= $this->memberList[$value];
unset ($this->memberList["$value"]);
}
/* Add objects to group */
- if (isset($_POST['add_object_finish']) && isset($_POST['objects'])){
+ if (isset($_POST['add_object_finish']) && isset($_POST['objects']) && chkacl($this->acl,"gosaGroupObjects") == ""){
foreach ($_POST['objects'] as $value){
$this->memberList["$value"]= $this->objects[$value];
$this->member["$value"]= $value;
}
/* Delete objects from group */
- if (isset($_POST['delete_membership']) && isset($_POST['members'])){
+ if (isset($_POST['delete_membership']) && isset($_POST['members']) && chkacl($this->acl,"gosaGroupObjects") == ""){
foreach ($_POST['members'] as $value){
if(isset($this->memberList[$value])){
$this->objects["$value"]= $this->memberList[$value];
/* Base select dialog */
$once = true;
foreach($_POST as $name => $value){
- if(preg_match("/^chooseBase/",$name) && $once){
+ if(preg_match("/^chooseBase/",$name) && $once && chkacl($this->acl,"base") == ""){
$once = false;
$this->dialog = new baseSelectDialog($this->config);
$this->dialog->setCurrentBase($this->base);
}
/* Add objects? */
- if (isset($_POST["edit_membership"])){
+ if (isset($_POST["edit_membership"]) && chkacl($this->acl,"gosaGroupObjects") == ""){
$this->group_dialog= TRUE;
$this->dialog= TRUE;
}
}
/* Bases / Departments */
-
- if (isset($_POST['base'])){
- $this->base= $_POST['base'];
- }
+ if (isset($_POST['base']) && chkacl($this->acl,"base") == ""){
+ $this->base= $_POST['base'];
+ }
/* Assemble combine string */
if ($this->gosaGroupObjects == "[]"){
if (chkacl ($this->acl, "base") == "" && isset($_POST["base"])){
$this->base= $_POST["base"];
}
-
}
}
$ui= get_userinfo();
$acl= get_permissions ($new_dn, $ui->subtreeACL);
$acl= get_module_permission($acl, "group", $new_dn);
- if (chkacl($acl, "create") != ""){
+ if (chkacl($acl, "create") != "" && $this->dn=="new"){
$message[]= _("You have no permissions to create a group on this 'Base'.");
}
diff --git a/plugins/admin/ogroups/class_ogroupManagement.inc b/plugins/admin/ogroups/class_ogroupManagement.inc
index 09fba6b173dcf135311ce696315d78d20da52384..a0a981e6441536ffd3d627d04d77ae9a5c632c5b 100644 (file)
/* Only perform copy / paste if it is enabled
*/
- /* Display the copy & paste dialog, if it is currently open */
- $ret = $this->copyPasteHandling($s_action,$s_entry);
- if($ret){
- return($ret);
+
+ /********************
+ Copy & Paste Handling ...
+ ********************/
+
+ /* Only perform copy&paste requests if it is enabled
+ */
+ /* Get 'dn' from posted 'uid' */
+ if(in_array_ics($s_action,array("editPaste","cut","copy"))){
+
+ if(isset($this->ogrouplist[trim($s_entry)]['dn'])){
+ $dn= $this->ogrouplist[trim($s_entry)]['dn'];
+ }else{
+ $dn = $this->DivListOGroup->selectedBase;
+ }
+
+ $acl= get_permissions ($dn, $this->ui->subtreeACL);
+ $acl= get_module_permission($acl, "ogroup", $dn);
+
+ if($acl != "#all#"){
+ print_red (_("You are not allowed to execute this method!"));
+ }else{
+ /* Display the copy & paste dialog, if it is currently open */
+ $ret = $this->copyPasteHandling($s_action,$s_entry);
+ if($ret){
+ return($ret);
+ }
+ }
}
/****************
diff --git a/plugins/admin/ogroups/class_phonequeue.inc b/plugins/admin/ogroups/class_phonequeue.inc
index 2a2b1ad9c0e5311998bf99548df4c5d7e060840f..7e712a4a0ce0814f602b93fe08d9339437069302 100644 (file)
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
- $this->is_account= !$this->is_account;
+
+ /* Onyl 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;
+ }
}
/* Show tab dialog headers */
plugin::save_object();
if(isset($_POST['phonenumber'])){
foreach(array("goFonDialOption_t","goFonDialOption_T","goFonDialOption_h","goFonDialOption_r","goFonDialOption_H","goFonMusiconHold") as $val){
- if(isset($_POST[$val])){
- $this->$val = $_POST[$val];
- }else{
- $this->$val = false;
+ if(chkacl($this->acl,$val) == "") {
+ if(isset($_POST[$val])){
+ $this->$val = $_POST[$val];
+ }else{
+ $this->$val = false;
+ }
}
}
if(isset($_POST['goFonQueueAnnounceHoldtime'])){
index 03d76d20a84f6f33705dc442b41567860abc20dc..4b2e746954c385b7dbadc3909b26837b25aff416 100644 (file)
$names.= "$cn ";
}
- if (isset($_POST['action'])){
+ if (isset($_POST['action']) && $this->acl == "#all#"){
/* Update members fai state */
$this->update_term_member_FAIstate(trim($_POST['saction']));
***************/
/* Add new ntp Server to our list */
- if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers']))){
+ if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers'])) && $this->acl == "#all#"){
$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 == "#all#"){
foreach($_POST['gotoNtpServerSelected'] as $name){
unset($this->gotoNtpServer[$name]);
}
index 02e671f0f912b14a73b3253e1c4b532108805b7a..cdd9e71846390c66fcecbd73b1320017cf48f96d 100644 (file)
<tr>
<td><LABEL for="goFonHomeServer">{t}Home server{/t}</LABEL>{$must}</td>
<td>
- <select name='goFonHomeServer'>
+ <select name='goFonHomeServer' {$goFonHomeServerACL}>
{html_options options=$goFonHomeServers selected=$goFonHomeServer}
</select>
</td>