X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fogroups%2Fclass_divListOGroup.inc;h=69e6ce20738473cd3497846c822f3eb65cdc7ede;hb=0eebfd3829749fcdcc5d9995ca9675d99f81888a;hp=073286cbf871516a5c7806991dd6ec629ecf4940;hpb=e315a2db90682734f0b90a9e1c305261847d58ed;p=gosa.git
diff --git a/plugins/admin/ogroups/class_divListOGroup.inc b/plugins/admin/ogroups/class_divListOGroup.inc
index 073286cbf..69e6ce207 100755
--- a/plugins/admin/ogroups/class_divListOGroup.inc
+++ b/plugins/admin/ogroups/class_divListOGroup.inc
@@ -29,7 +29,7 @@ class divListOGroup extends MultiSelectWindow
function divListOGroup ($config,$parent)
{
- MultiSelectWindow::MultiSelectWindow($config,"OGroups");
+ MultiSelectWindow::MultiSelectWindow($config, "OGroups", "ogroups");
$this->parent = $parent;
$this->ui = get_userinfo();
@@ -85,15 +85,32 @@ class divListOGroup extends MultiSelectWindow
which are shown in the listbox on top of the listbox
*/
$options= "";
- foreach ($this->config->idepartments as $key => $value){
- if ($this->selectedBase == $key){
- $options.= "";
- } else {
- $options.= "";
+
+ /* Get all departments within this subtree */
+ $base = $this->config->current['BASE'];
+ $deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
+ array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH);
+
+ /* Load possible departments */
+ $ui= get_userinfo();
+ $tdeps= $ui->get_module_departments("ogroups");
+
+ $ids = $this->config->idepartments;
+
+ foreach($deps as $dep){
+ if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){
+
+ $value = $ids[$dep['dn']];
+ if ($this->selectedBase == $dep['dn']){
+ $options.= "";
+ } else {
+ $options.= "";
+ }
}
}
- if($this->parent->CopyPasteHandler){
+ /* Get copy & paste icon */
+ if(preg_match("/w/",$ui->get_permissions($this->selectedBase,"ogroups/ogroup")) && $this->parent->CopyPasteHandler){
$Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon();
}else{
$Copy_Paste ="";
@@ -111,16 +128,19 @@ class divListOGroup extends MultiSelectWindow
title='"._("Reload list")."' name='submit_department' alt='"._("Submit")."'> ".
" ";
- if($this->parent->snapshotEnabled()){
- $listhead .= " ".
- " ";
+ $acls = $ui->get_permissions($this->selectedBase,"ogroups/ogroup");
+ if(preg_match("/c/",$acls) && preg_match("/w/",$acls)){
+ $listhead .= $this->get_snapshot_header($this->selectedBase);
+ }else{
+ $listhead .= " ";
}
+ if(preg_match("/c/",$acls)) {
+ $listhead .=" ";
+ }
- $listhead .=" ".
- $Copy_Paste.
+ $listhead .= $Copy_Paste.
" ".
_("Base")." ".
" parent->snapshotEnabled()){
$action_col_size += 38;
}
+
+ $ui = get_userinfo();
// Assigning ogroups
foreach($list as $key => $val){
/* Create action icons */
- $actions = $this->GetSnapShotActions($val['dn']);
- if($this->parent->CopyPasteHandler){
+ $actions= "";
+ if($this->parent->CopyPasteHandler && preg_match("/w/",$ui->get_category_permissions($val['dn'],"ogroups"))){
$actions.= " ";
$actions.= " ";
}
+
+
$actions.= "";
- $actions.= "";
+
+ if(preg_match("/w/",$ui->get_permissions($val['dn'],"groups/group"))){
+ $actions.= $this->GetSnapShotActions($val['dn']);
+ }
+
+ if(preg_match("/d/",$ui->get_permissions($val['dn'],"ogroups/ogroup"))) {
+ $actions.= "";
+ }else{
+ $action.= "";
+ }
if(isset($val['mail'])){