summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6b48e51)
raw | patch | inline | side by side (parent: 6b48e51)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 26 Jun 2008 08:21:25 +0000 (08:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 26 Jun 2008 08:21:25 +0000 (08:21 +0000) |
-Allow deparments of different type and and same name, like l=test o=test
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11448 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11448 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/departments/class_departmentGeneric.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc
index 09509b9c6f70425a98fc3ffbdabadcea565748a5..45b5a52bed9c68f7d674ab1e47e6a1c665b3a86e 100644 (file)
}
}
-
-
- /*! \brief Returns a list of all available departments for this object.
- If this object is new, all departments we are allowed to create a new user in are returned.
- If this is an existing object, return all deps. we are allowed to move tis object too.
-
- @return Array [dn] => "..name" // All deps. we are allowed to act on.
- */
- function get_allowed_bases()
- {
- $ui = get_userinfo();
- $deps = array();
-
- /* Is this a new object ? Or just an edited existing object */
- if(!$this->initially_was_account && $this->is_account){
- $new = true;
- }else{
- $new = false;
- }
-
- $ideps = $this->config->idepartments;
- if(!isset($ideps[$this->base])){
- $ideps[$this->base] = ".";
- }
- foreach($deps as $dn => $name){
- if($new && $this->acl_is_createable($dn)){
- $deps[$dn] = $name;
- }elseif(!$new && $this->acl_is_moveable($dn)){
- $deps[$dn] = $name;
- }
- }
-
- /* Add current base */
- if(isset($this->base) && isset($ideps[$this->base])){
- $deps[$this->base] = $ideps[$this->base];
- }else{
- trigger_error("Cannot return list of departments, no default base found in class ".get_class($this).". ".$this->base);
- }
- return($deps);
- }
-
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: