Commit b3ffbbfa authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #5395 Added a few things to prepare for groups templates

parent 9eca28bb
......@@ -25,6 +25,8 @@ class groupManagement extends simpleManagement
protected $autoFilter = FALSE;
public static $skipTemplates = TRUE;
static function plInfo()
{
return array(
......@@ -66,6 +68,10 @@ class groupManagement extends simpleManagement
$this->filter->elements['SAMBA']['unset'] = '';
$this->filter->elements['SAMBA']['set'] = '';
}
if (static::$skipTemplates) {
$this->filter->elements['FILTERTEMPLATE']['unset'] = '';
$this->filter->elements['FILTERTEMPLATE']['set'] = '';
}
}
static function filterProperties($row, $dn, $objectType, $attrs, $gosaGroupObjects = NULL)
......@@ -174,6 +180,12 @@ class groupManagement extends simpleManagement
)
);
}
if (!static::$skipTemplates) {
$filters[] = array(
'id' => 'FILTERTEMPLATE',
'label' => sprintf(_('Show %s'), _('Template'))
);
}
$smarty->assign('objectFilters', $filters);
$this->headpage->update();
$display = $this->headpage->render();
......
......@@ -10,12 +10,20 @@
<search>
<query>
<backend>LDAP</backend>
<filter>(&amp;(|$PRIMARY$MAIL$SAMBA$ROLE(&amp;(objectClass=groupOfNames)(|(gosaGroupObjects=[])$USER$GROUP$APPLICATION$SERVER$WORKSTATION$WINDOWS$TERMINAL$PRINTER$PHONE$SIMPLESECURITYOBJECT$UNKNOWN)))$NAME)</filter>
<filter>(&amp;(|$PRIMARY$MAIL$SAMBA$ROLE$FILTERTEMPLATE(&amp;(objectClass=groupOfNames)(|(gosaGroupObjects=[])$USER$GROUP$APPLICATION$SERVER$WORKSTATION$WINDOWS$TERMINAL$PRINTER$PHONE$SIMPLESECURITYOBJECT$UNKNOWN)))$NAME)</filter>
<attribute>*</attribute>
</query>
<scope>auto</scope>
</search>
<element>
<type>checkbox</type>
<tag>FILTERTEMPLATE</tag>
<default></default>
<unset></unset>
<set>(objectClass=fdTemplate)</set>
</element>
<element>
<type>checkbox</type>
<tag>PRIMARY</tag>
......@@ -147,7 +155,7 @@
<alphabet>true</alphabet>
<autocomplete>
<backend>LDAP</backend>
<filter>(&amp;(|(objectClass=posixGroup)$ROLE(objectClass=groupOfNames))(|(cn=*$NAME*)(description=*$NAME*)))</filter>
<filter>(&amp;(|(objectClass=posixGroup)$ROLE$FILTERTEMPLATE(objectClass=groupOfNames))(|(cn=*$NAME*)(description=*$NAME*)))</filter>
<attribute>cn</attribute>
<frequency>0.5</frequency>
<characters>3</characters>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment