Code

Updated license mangement
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Jan 2010 09:13:19 +0000 (09:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Jan 2010 09:13:19 +0000 (09:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15039 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/opsi/admin/opsiLicenses/class_filterOpsiLicense.inc
gosa-plugins/opsi/admin/opsiLicenses/opsiLicense-filter.xml
gosa-plugins/opsi/admin/opsiLicenses/opsiLicense-list.xml

index 2a45bb0ebdfbf0634eeb7422015da7ef71b9b4dd..368aeafb61ac6582b54a2b552272df1a65aaa817 100644 (file)
@@ -17,7 +17,10 @@ class filterOpsiLicense {
       // Reset the list of licenses
       foreach($res as $item){
 
+        $item['objectClass'] = array('fake_opsiLicense');
+
         // Fake an ldap entry, this enables ACL checks.
+        $entry = array();
         $entry['dn'] = "opsi:cn=".$item['cn'][0].",".$config->current['BASE'];
         foreach($item as $name => $value){
           $entry[] = $name;
index af1ba4e5f2338e5592c33fdc471006b57e19dbf6..220ee4025747300d80030e9df34821d9da9915be 100644 (file)
@@ -2,7 +2,7 @@
 
 <filterdef>
   <definition>
-    <category>roles</category>
+    <category>opsi</category>
     <template>opsiLicense-filter.tpl</template>
     <initial>true</initial>
   </definition>
@@ -10,7 +10,7 @@
   <search>
     <query>
       <backend>OpsiLicense</backend>
-      <filter>(&amp;(objectClass=organizationalRole)$NAME)</filter>
+      <filter>(&amp;(objectClass=fake_opsiLicense)$NAME)</filter>
       <attribute>dn</attribute>
       <attribute>objectClass</attribute>
       <attribute>cn</attribute>
@@ -29,8 +29,8 @@
     <set>(cn=*$*)</set>
     <alphabet>false</alphabet>
     <autocomplete>
-      <backend>LDAP</backend>
-      <filter>(&amp;(objectClass=organizationalRole)(cn=*$NAME*))</filter>
+      <backend>OpsiLicense</backend>
+      <filter>(&amp;(objectClass=fake_opsiLicense)(cn=*$NAME*))</filter>
       <attribute>cn</attribute>
       <frequency>0.5</frequency>
       <characters>3</characters>
index 17aab5031d43a131eb640c73252e1f30c7c6bd02..ba68c47b538144208e15ddaa7bc4eafbe4b798e9 100644 (file)
@@ -8,15 +8,15 @@
     <multiSelect>true</multiSelect>
     <template>opsiLicense-list.tpl</template>
     <module>roles</module>
-    <label>List of roles</label>
+    <label>List of licenses</label>
     <defaultSortColumn>1</defaultSortColumn>
 
     <objectType>
-      <label>Role</label>
-      <objectClass>organizationalRole</objectClass>
-      <category>roles</category>
-      <class>role</class>
-      <image>plugins/rolemanagement/images/role.png</image>
+      <label>License</label>
+      <objectClass>fake_opsiLicense</objectClass>
+      <category>opsi</category>
+      <class>licenseGeneric</class>
+      <image>plugins/opsi/images/license.png</image>
     </objectType>
 
   </definition>
@@ -70,7 +70,7 @@
      <action>
       <name>new</name>
       <type>entry</type>
-      <image>plugins/rolemanagement/images/new.png</image>
+      <image>plugins/opsi/images/license.png</image>
       <label>Role</label>
      </action>
     </action>