summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2565588)
raw | patch | inline | side by side (parent: 2565588)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Jul 2011 07:38:59 +0000 (07:38 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Jul 2011 07:38:59 +0000 (07:38 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20930 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/ogroups/class_ogroup.inc | patch | blob | history | |
gosa-core/plugins/admin/ogroups/generic.tpl | patch | blob | history |
diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc
index b4e75fccbab7d07519ad52b4121bbecd1e048918..cf60da6fd3e2aa29991b703ca1a8700487f2c650 100644 (file)
var $view_logged = FALSE;
var $copyMembers = TRUE;
-
+ var $wasDyGroup = FALSE;
var $baseSelector;
/* Already assigned Workstations. Will be hidden in selection.
$data[$key] = $dn;
$lData[$key] = array('data'=> array(image($image),$name));
}
+
+ if($this->isRestrictedByDynGroup()){
+ $this->memberListing->setDeleteable(false);
+ $smarty->assign("memberACL", preg_replace("/[^r]/", "", $this->getacl("member")));
+ $smarty->assign("isRestrictedByDynGroup", TRUE);
+
+ }else{
+ $this->memberListing->setDeleteable(true);
+ $smarty->assign("isRestrictedByDynGroup", FALSE);
+ }
+
$this->memberListing->setListData($data,$lData);
$this->memberListing->update();
$smarty->assign("memberList",$this->memberListing->render());
}
+ function isRestrictedByDynGroup()
+ {
+ $bool = FALSE;
+ if(isset($this->parent->by_object['DynamicLdapGroup'])){
+ $bool = $this->parent->by_object['DynamicLdapGroup']->isAttributeDynamic('member');
+ }
+ $this->wasDyGroup |= $bool;
+ return($bool);
+ }
+
+
function set_acl_base($base)
{
plugin::set_acl_base($base);
plugin::save();
/* Move members to target array */
- $this->attrs['member'] =array();
- foreach ($this->member as $key => $desc){
- $this->attrs['member'][]= LDAP::fix($key);
+ if(!$this->wasDyGroup && !$this->isRestrictedByDynGroup()){
+ $this->attrs['member'] =array();
+ foreach ($this->member as $key => $desc){
+ $this->attrs['member'][]= LDAP::fix($key);
+ }
}
$ldap= $this->config->get_ldap_link();
diff --git a/gosa-core/plugins/admin/ogroups/generic.tpl b/gosa-core/plugins/admin/ogroups/generic.tpl
index 34b4d8c2a093a4a023097f0092f14cd49b1c5908..e99cc8ac039b7e28429582de62ade2b08aedfce1 100644 (file)
{$trustModeDialog}
</td>
<td style='padding-left:10px;' class='left-border'>
+ {if $isRestrictedByDynGroup}
+ <b>{t}The group members are part of a dyn-group and cannot be managed!{/t}</b>
+ <br>
+ <br>
+ {/if}
<b><LABEL for="members">{t}Member objects{/t}</LABEL></b> ({$combinedObjects})
<br>
{render acl=$memberACL}
{$memberList}
{/render}
+{if !$isRestrictedByDynGroup}
{render acl=$memberACL}
<button type='submit' name='edit_membership'>{msgPool type=addButton}</button>
{/render}
+{/if}
</td>
</tr>
</table>