summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6e37988)
raw | patch | inline | side by side (parent: 6e37988)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 22 Nov 2006 12:04:05 +0000 (12:04 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 22 Nov 2006 12:04:05 +0000 (12:04 +0000) |
Fixed acl C&P detection for user/groups/ogroups
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5192 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5192 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc
index 4ba527185a31917bb3082a4470931cb18cfe4a5e..801ca3fe6268847ea647622a53ecf8b47b7f3b13 100644 (file)
if($s_action == "copy"){
$this->CopyPasteHandler->Clear();
$dn = $this->applications[$s_entry]['dn'];
-
+
/* Check Acls */
$acl_all= $this->ui->has_complete_category_acls($dn,"application");
- if(!preg_match("/(c.*w|w.*c)/",$acl_all)){
- return("");
+ if(preg_match("/(c.*w|w.*c)/",$acl_all)){
+ $obj = new apptabs($this->config, $this->config->data['TABS']['APPSTABS'], $dn, "application");
+ $objNew = new apptabs($this->config, $this->config->data['TABS']['APPSTABS'], "new","application");
+ $this->CopyPasteHandler->Copy($obj,$objNew);
}
-
- $obj = new apptabs($this->config, $this->config->data['TABS']['APPSTABS'], $dn, "application");
- $objNew = new apptabs($this->config, $this->config->data['TABS']['APPSTABS'], "new","application");
- $this->CopyPasteHandler->Copy($obj,$objNew);
}
/* Copy current object to CopyHandler
/* Check Acls */
$acl_all= $this->ui->has_complete_category_acls($dn,"application");
- if(!preg_match("/(c.*w|w.*c)/",$acl_all)){
- return("");
+ if(preg_match("/(c.*w|w.*c)/",$acl_all)){
+ $obj = new apptabs($this->config, $this->config->data['TABS']['APPSTABS'], $dn, "application");
+ $this->CopyPasteHandler->Cut($obj);
}
-
- $obj = new apptabs($this->config, $this->config->data['TABS']['APPSTABS'], $dn, "application");
- $this->CopyPasteHandler->Cut($obj);
}
}
diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc
index d3af7a032014ba94f3d0f401d765d7c1692e3c49..0fab284e7b081b5c8183c32804f0a3a1ec9702a6 100644 (file)
if($s_action == "copy"){
$dn = $this->grouplist[trim($s_entry)]['dn'];
- $acl = $this->ui->get_permissions($dn,"groups/group");
- if(preg_match("/(c.*w|w.*c)/",$acl)){
+ $acl_all = $ui->has_complete_category_acls($this->selectedBase,"groups") ;
+ if(preg_match("/(c.*w|w.*c)/",$acl_all)){
$this->CopyPasteHandler->Clear();
$obj = new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $dn);
if($s_action == "cut"){
$dn = $this->grouplist[trim($s_entry)]['dn'];
- $acl = $this->ui->get_permissions($dn,"groups/group");
- if(preg_match("/(c.*w|w.*c)/",$acl)){
+ $acl_all = $ui->has_complete_category_acls($this->selectedBase,"groups") ;
+ if(preg_match("/(c.*w|w.*c)/",$acl_all)){
$this->CopyPasteHandler->Clear();
$obj= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $dn);
diff --git a/plugins/admin/mimetypes/class_mimetypeManagement.inc b/plugins/admin/mimetypes/class_mimetypeManagement.inc
index 3ee002eca2626df699727e1c159ee9e43422b597..3f04ac0aadb7da952ed264d0f24b5225eff0b9f4 100755 (executable)
if($s_action == "copy"){
$this->CopyPasteHandler->Clear();
$dn = $this->mimetypes[$s_entry]['dn'];
- $obj = new mimetabs($this->config, $this->config->data['TABS']['MIMETABS'], $dn,"mimetypes");
- $obj->set_acl_base($this->dn);
- $objNew = new mimetabs($this->config, $this->config->data['TABS']['MIMETABS'], "new","mimetypes");
- $objNew->set_acl_base($this->dn);
- $this->CopyPasteHandler->Copy($obj,$objNew);
+
+ /* Check acls */
+ $acl_all= $this->ui->has_complete_category_acls($dn,"ogroups");
+ if(preg_match("/(c.*w|w.*c)/",$acl_all)){
+ $obj = new mimetabs($this->config, $this->config->data['TABS']['MIMETABS'], $dn,"mimetypes");
+ $obj->set_acl_base($this->dn);
+ $objNew = new mimetabs($this->config, $this->config->data['TABS']['MIMETABS'], "new","mimetypes");
+ $objNew->set_acl_base($this->dn);
+ $this->CopyPasteHandler->Copy($obj,$objNew);
+ }
}
/* Copy current object to CopyHandler
if($s_action == "cut"){
$this->CopyPasteHandler->Clear();
$dn = $this->mimetypes[$s_entry]['dn'];
- $obj = new mimetabs($this->config, $this->config->data['TABS']['MIMETABS'], $dn);
- $this->CopyPasteHandler->Cut($obj);
+
+ /* Check acls */
+ $acl_all= $this->ui->has_complete_category_acls($dn,"ogroups");
+ if(preg_match("/(c.*w|w.*c)/",$acl_all)){
+ $obj = new mimetabs($this->config, $this->config->data['TABS']['MIMETABS'], $dn);
+ $this->CopyPasteHandler->Cut($obj);
+ }
}
}
index 50a83fa6cf8557db6a3ad106e548a4616adbd1f0..f61803d9e0539a0e78cd9fbdc50bf0a77386ef36 100644 (file)
</tr>
<tr>
<td style='width:50%; vertical-align:top;' >
-
<table>
<tr>
<td>
{/render}
</td>
</tr>
+{if !$isReleaseMimeType}
<tr>
<td><LABEL for="base">{t}Base{/t}{$must}</LABEL></td>
<td>
-{render acl=$baseACL}
- <select size="1" id="base" name="base" title="{t}Choose subtree to place application in{/t}"
- {if $isReleaseMimeType} disabled {/if}>
- {html_options options=$bases selected=$base_select}
- </select>
-{/render}
-{if !$isReleaseMimeType}
-{render acl=$baseACL disable_picture='images/folder_gray.png'}
- <input type="image" name="chooseBase" src="images/folder.png" class="center" title="{t}Select a base{/t}">
-{/render}
-{/if}
+ {render acl=$baseACL}
+ <select size="1" id="base" name="base" title="{t}Choose subtree to place application in{/t}"
+ {html_options options=$bases selected=$base_select}
+ </select>
+ {/render}
+ {if !$isReleaseMimeType}
+ {render acl=$baseACL disable_picture='images/folder_gray.png'}
+ <input type="image" name="chooseBase" src="images/folder.png" class="center" title="{t}Select a base{/t}">
+ {/render}
+ {/if}
</td>
</tr>
+{/if}
</table>
</td>
diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc
index c6accea237b0b0291a38ac84c6df9642236b9feb..3edbf604d41ec5f1ec1f4e5a236eb6844fae1c60 100644 (file)
}
/* Get copy & paste icon */
- $acl_all = $ui->has_complete_category_acls($this->selectedBase,"users/user") ;
+ $acl_all = $ui->has_complete_category_acls($this->selectedBase,"users") ;
$acl = $ui->get_permissions($this->selectedBase,"users/user");
if(preg_match("/(c.*w|w.*c)/",$acl_all) && $this->parent->CopyPasteHandler){
$Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon();
$action= "";
/* Add copy & cut icons */
- $acl_all = $ui->has_complete_category_acls($this->selectedBase,"users/user") ;
+ $acl_all = $ui->has_complete_category_acls($this->selectedBase,"users") ;
$acl = $ui->get_permissions($val['dn'],"users/user");
if(preg_match("/(c.*w|w.*c)/",$acl_all) && $this->parent->CopyPasteHandler){
$action .= "<input class='center' type='image'
diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc
index ce9b646ccc3fa79c16063069ae9fe996f9586fff..c0042797a60a184c1b8ec58f9e99d9cff82d85f2 100644 (file)
$dn= $this->list[trim($s_entry)]['dn'];
/* Check acl */
- $acl = $this->ui->get_permissions($dn,"users/user");
- if(preg_match("/(c.*w|w.*c)/",$acl)){
+ $acl_all = $ui->has_complete_category_acls($this->selectedBase,"users") ;
+ if(preg_match("/(c.*w|w.*c)/",$acl_all)){
$obj = new usertabs($this->config, $this->config->data['TABS']['USERTABS'], $dn);
$obj->set_acl_base($dn);
$objNew = new usertabs($this->config, $this->config->data['TABS']['USERTABS'], "new");
$dn= $this->list[trim($s_entry)]['dn'];
/* Check acl */
- $acl = $this->ui->get_permissions($dn,"users/user");
- if(preg_match("/(c.*w|w.*c)/",$acl)){
+ $acl_all = $ui->has_complete_category_acls($this->selectedBase,"users") ;
+ if(preg_match("/(c.*w|w.*c)/",$acl_all)){
$obj= new usertabs($this->config, $this->config->data['TABS']['USERTABS'], $dn);
$obj->set_acl_base($dn);
$this->CopyPasteHandler->Cut($obj);