summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7afa237)
raw | patch | inline | side by side (parent: 7afa237)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Sep 2006 06:15:38 +0000 (06:15 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Sep 2006 06:15:38 +0000 (06:15 +0000) |
Updated get_allowed_bases to use get_module_departments.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4719 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4719 594d385d-05f5-0310-b6e9-bd551577e9d8
index 04f89717e90812cfc716605cd912f1ab783f8ca2..515c30d12a6ba40186dc4bd99d3a18bbd1d518a7 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
/* Get all allowed bases to move an object to or to create a new object.
Idepartments also contains all base departments which lead to the allowed bases */
- function acl_get_bases($category = "")
+ function get_allowed_bases($category = "")
{
$ui = get_userinfo();
$deps = array();
-
+
/* Set category */
if(empty($category)){
$category = $this->acl_category.get_class($this);
echo "No default base found. ".$this->base."<br> ";
}
+ $cat_bases = $ui->get_module_departments(preg_replace("/\/.*$/","",$category));
foreach($this->config->idepartments as $dn => $name){
+
+ if(!in_array_ics($dn,$cat_bases)){
+ continue;
+ }
+
$acl = $ui->get_permissions($dn,$category);
if($new && preg_match("/c/",$acl)){
$deps[$dn] = $name;
diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc
index 53ace4e8c2ac8077a6b204e7ae807df4cae26660..7cbc9280dc1fff0916953a3a72246c13ddf45bdb 100644 (file)
/* Fill templating stuff */
$smarty->assign("cn", $this->cn);
- $smarty->assign("bases", $this->acl_get_bases());
+ $smarty->assign("bases", $this->get_allowed_bases());
if ($this->dn == "new"){
$smarty->assign("selectmode", "");
$smarty->assign("namemode", "");
foreach($_POST as $name => $value){
if(preg_match("/^chooseBase/",$name) && $once){
$once = false;
- $this->dialog = new baseSelectDialog($this->config,$this,$this->acl_get_bases());
+ $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
$this->dialog->setCurrentBase($this->base);
}
}
diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc
index a29b3edc428c0e57137064cd3290e5c38b0b2634..3b6daee52d8093460ba9b38e69918c1bd64a7a11 100644 (file)
foreach($_POST as $name => $value){
if((preg_match("/^chooseBase/",$name) && $once) && ($this->acl_is_moveable())){
$once = false;
- $this->dialog = new baseSelectDialog($this->config,$this,$this->acl_get_bases());
+ $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
$this->dialog->setCurrentBase($this->base);
}
}
}
/* Hide all departments, that are subtrees of this department */
- $bases = $this->acl_get_bases();
+ $bases = $this->get_allowed_bases();
if(($this->dn == "new")||($this->dn == "")){
$tmp = $bases;
}else{
diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc
index ef5341b243f322cc00803d30007f1eb191ec58e8..3f87a2a171c8efcf61131b01e7b2a466a7212117 100644 (file)
if((preg_match("/^chooseBase/",$name) && $once) && ($this->acl_is_moveable())){
$once = false;
- $this->dialog = new baseSelectDialog($this->config,$this,$this->acl_get_bases());
+ $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
$this->dialog->setCurrentBase($this->base);
}
}
$smarty->assign("launchimage", get_template_path('images/small_filter.png'));
$smarty->assign("tree_image", get_template_path('images/tree.png'));
- $smarty->assign("deplist", $this->acl_get_bases("users/user"));
+ $smarty->assign("deplist", $this->get_allowed_bases("users/user"));
$smarty->assign("alphabet", generate_alphabet());
foreach( array("dselect", "regex","SubSearchGroup") as $type){
$smarty->assign("$type", $gufilter[$type]);
$this->base= $_POST['base'];
}
- $smarty->assign("bases", $this->acl_get_bases());
+ $smarty->assign("bases", $this->get_allowed_bases());
$smarty->assign("base_select", $this->base);
if ($this->samba3){
diff --git a/plugins/admin/mimetypes/class_mimetypeGeneric.inc b/plugins/admin/mimetypes/class_mimetypeGeneric.inc
index 37d45ca794e07734f7743737838f3ae7dab85edb..08146ee9ecd6dbbaef47bc91bc17e05804edfa12 100644 (file)
foreach($_POST as $name => $value){
if(preg_match("/^chooseBase/",$name) && $once){
$once = false;
- $this->dialog = new baseSelectDialog($this->config,$this,$this->acl_get_bases());
+ $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
echo $this->base;
$this->dialog->setCurrentBase($this->base);
}
$fields = array($field1,$field2);
$DivEApps -> AddEntry($fields);
}
- $smarty->assign("bases", $this->acl_get_bases());
+ $smarty->assign("bases", $this->get_allowed_bases());
$smarty->assign("base_select", $this->base);
$smarty->assign("isReleaseMimeType", $this->isReleaseMimeType);
$smarty->assign("gotoMimeFilePatterns", $DivPatterns->DrawList());
index e913e977b7f85c92c8f384673ef1dc1e6bf918d6..50a83fa6cf8557db6a3ad106e548a4616adbd1f0 100644 (file)
{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>
index f619d71f9a6f3db95db91b4bc7a1ca9045fd8e47..f2a186c12054b8b307e0237a2142b969cd7a358b 100644 (file)
foreach($_POST as $name => $value){
if(preg_match("/^chooseBase/",$name) && $once && $this->acl_is_moveable()){
$once = false;
- $this->dialog = new baseSelectDialog($this->config,$this,$this->acl_get_bases());
+ $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
$this->dialog->setCurrentBase($this->base);
}
}
}
/* Assign variables */
- $smarty->assign("bases", $this->acl_get_bases());
+ $smarty->assign("bases", $this->get_allowed_bases());
$smarty->assign("base_select", $this->base);
$smarty->assign("department", $this->department);
$smarty->assign("members", $this->convert_list($this->memberList));
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 43634baf83317e80b930c12cc02eea9b079976b9..44fc8330dfdd74825da5ed5cf95439e64bebbfd6 100644 (file)
foreach($_POST as $name => $value){
if(preg_match("/^chooseBase/",$name) && $once){
$once = false;
- $this->dialog = new baseSelectDialog($this->config,$this,$this->acl_get_bases());
+ $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
$this->dialog->setCurrentBase($this->base);
$this->baseSelection = true;
}
}
/* Fill templating stuff */
- $smarty->assign("bases", $this->acl_get_bases());
+ $smarty->assign("bases", $this->get_allowed_bases());
$smarty->assign("base_select", $this->base);
/* Assign attributes */
diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index 8f31136e57af7a2f3df259f720bd41cfb15c223d..b61573302a721d87d37dca48e8418335b18429c1 100644 (file)
foreach($_POST as $name => $value){
if(preg_match("/^chooseBase/",$name) && $once && $this->acl_is_writeable("base")){
$once = false;
- $this->dialog = new baseSelectDialog($this->config,$this,$this->acl_get_bases());
+ $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
$this->dialog->setCurrentBase($this->base);
}
}
$smarty->assign("cn", $this->cn);
$smarty->assign("l", $this->l);
- $smarty->assign("bases", $this->acl_get_bases());
+ $smarty->assign("bases", $this->get_allowed_bases());
$smarty->assign("staticAddress", "");
$tmp = array();
index 117b015d90c736c294ce0aa9afe73525443a9ece..e37f606770e1db45fda51e5f97106e51d6245e00 100644 (file)
function allowedBasesToMoveTo()
{
/* Get bases */
- $bases = $this->acl_get_bases();
+ $bases = $this->get_allowed_bases();
return($bases);
}