summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 388e811)
raw | patch | inline | side by side (parent: 388e811)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 21 Sep 2009 13:15:47 +0000 (13:15 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 21 Sep 2009 13:15:47 +0000 (13:15 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14303 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/opsi/admin/opsiLicences/class_licenceGeneric.inc | [deleted file] | patch | blob | history |
gosa-plugins/opsi/admin/opsiLicences/class_opsiLicenceHandler.inc | [deleted file] | patch | blob | history |
gosa-plugins/opsi/admin/opsiLicences/class_opsiLicences.inc | [deleted file] | patch | blob | history |
gosa-plugins/opsi/admin/opsiLicences/generic.tpl | [deleted file] | patch | blob | history |
gosa-plugins/opsi/admin/opsiLicences/main.inc | [deleted file] | patch | blob | history |
gosa-plugins/opsi/admin/opsiLicenses/class_licenceGeneric.inc | [new file with mode: 0644] | patch | blob |
gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenceHandler.inc | [new file with mode: 0644] | patch | blob |
gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicences.inc | [new file with mode: 0644] | patch | blob |
gosa-plugins/opsi/admin/opsiLicenses/generic.tpl | [new file with mode: 0644] | patch | blob |
gosa-plugins/opsi/admin/opsiLicenses/main.inc | [new file with mode: 0644] | patch | blob |
diff --git a/gosa-plugins/opsi/admin/opsiLicences/class_licenceGeneric.inc b/gosa-plugins/opsi/admin/opsiLicences/class_licenceGeneric.inc
+++ /dev/null
@@ -1,404 +0,0 @@
-<?php
-/*
-* This code is part of GOsa (http://www.gosa-project.org)
-* Copyright (C) 2003-2008 GONICUS GmbH
-*
-* ID: $$Id: class_opsiLicenses.inc 13520 2009-03-09 14:54:13Z hickert $$
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-
-class opsiLicens extends plugin {
-
- // The variables this plugin takes care of.
- var $cn = "";
- var $description ="";
- var $telephoneNumber = "";
- var $facsimileTelephoneNumber = "";
-
- // The objects base
- var $base = "";
-
- // Keep track if possible ng aming modifications
- var $orig_dn = "";
- var $orig_cn = "";
- var $orig_base = "";
-
- // The object classes written by this plugin
- var $objectclasses = array("top","organizationalRole");
-
- // The list of occupants ([dn])
- var $roleOccupant = array();
-
- // The roleOccupant cache, dn=>attrs
- var $roleOccCache = array();
-
- // A list of attributes managed by this plugin
- var $attributes = array("cn","description",
- "telephoneNumber","facsimileTelephoneNumber","roleOccupant");
-
-
- /* Initialize the class
- */
- function __construct($config,$dn){
- plugin::plugin($config,$dn);
- $this->is_account = TRUE;
-
- // Initialize list of occupants
- $this->roleOccupant = array();
- if(isset($this->attrs['roleOccupant'])){
- for($i=0;$i<$this->attrs['roleOccupant']['count']; $i++){
- $this->roleOccupant[] = $this->attrs['roleOccupant'][$i];
- }
- }
-
- // Detect the objects base
- if ($this->dn == "new"){
- $this->base = session::get('CurrentMainBase');
- } else {
- $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("roleRDN"), '/i')."/","",$this->dn);
- }
-
- // Keep track of naming attribute modifications
- $this->orig_base = $this->base;
- $this->orig_dn = $dn;
- $this->orig_cn = $this->cn;
-
- // Reload the occupant cache.
- $this->reload();
- }
-
-
- /* Keep occupant cache up to date.
- * Else, we may have entries we can't display.
- */
- function reload()
- {
- // Entries can't be added twice.
- $attrs = array("description", "objectClass", "uid","cn");
- $this->roleOccupant = array_unique($this->roleOccupant);
- $this->roleOccupant = array_values($this->roleOccupant);
-
- $ldap = $this->config->get_ldap_link();
- foreach($this->roleOccupant as $dn){
- if(!isset($this->roleOccCache[$dn])){
- if($ldap->dn_exists($dn)){
- $ldap->cat($dn, $attrs);
-
- $tmp = $ldap->fetch();
- if(!isset($tmp['cn'])){
-
- // Extract the namingAttribute out of the dn.
- $cn = preg_replace("/^[^=]*+=([^,]*).*$/","\\1",$tmp['dn']);
- if(isset($tmp['uid'])){
- $cn = $tmp['uid'][0];
- }
- if(isset($tmp['description'])){
- $cn.= " [".$tmp['description'][0]."]";
- }
- $tmp['cn'][0] = $cn;
- }
-
- $this->roleOccCache[$dn] = $tmp;
- }
- }
- }
-
- }
-
-
- function getOccupants(){
- return($this->roleOccupant);
- }
-
- /* Generate HTML output of this plugin.
- */
- function execute()
- {
- // Get list of possible ldap bases, will be selectable in the ui.
- $tmp = $this->allowedBasesToMoveTo();
-
-
- /***************
- * Dialog handling
- ***************/
-
- if(isset($_POST['edit_membership']) && !$this->dialog instanceOf plugin){
- $this->dialog = new occupantSelect($this->config,$this->dn,$this);
- }
- if(isset($_POST['delete_membership']) && !$this->dialog instanceOf plugin){
- if(isset($_POST['members'])){
- foreach($_POST['members'] as $id){
- if(isset($this->roleOccupant[$id])){
- unset($this->roleOccupant[$id]);
- }
- }
- $this->reload();
- }
- }
-
- if(isset($_POST['add_object_cancel']) && $this->dialog instanceOf plugin){
- $this->dialog = NULL;
- }
- if(isset($_POST['add_object_finish']) && $this->dialog instanceOf plugin){
- $ret = $this->dialog->save();
- foreach($ret as $key => $entry){
- $this->roleOccupant[] = $entry['dn'];
- $this->roleOccCache[$entry['dn']] = $entry['attrs'];
- }
- $this->reload();
- $this->dialog = NULL;
- }
-
- if($this->dialog instanceOf plugin){
- $this->dialog->save_object();
- return($this->dialog->execute());
- }
-
-
- /***************
- * Template handling
- ***************/
-
- // Get smarty instance and assign required variables.
- $smarty = get_smarty();
- $smarty->assign("bases", $tmp);
- $smarty->assign("base_select",$this->base);
- $smarty->assign("members",$this->convert_list());
- foreach($this->attributes as $attr){
- $smarty->assign($attr,$this->$attr);
- }
-
- // Assign current permissions for each attribute.
- $tmp = $this->plInfo();
- foreach($tmp['plProvidedAcls'] as $attr => $desc){
- $smarty->assign($attr."ACL",$this->getacl($attr));
- }
- return($smarty->fetch(get_template_path('roleGeneric.tpl',TRUE,dirname(__FILE__))));
- }
-
-
- /* Check user input and return a list of 'invalid input' messages.
- */
- function check()
- {
- $message = plugin::check();
-
- // Set the new acl base
- if($this->dn == "new") {
- $this->set_acl_base($this->base);
- }
-
- // Check if we are allowed to create/move this user
- if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
- $message[]= msgPool::permCreate();
- }elseif($this->orig_dn != "new" &&
- !$this->acl_is_moveable($this->base) &&
- ($this->orig_base != $this->base || $this->orig_cn != $this->cn )){
- $message[]= msgPool::permMove();
- }
-
- /* must: cn */
- if ($this->cn == ""){
- $message[]= msgPool::required(_("Name"));
- }
-
- // Check if this name is uniq for roles.
- $ldap= $this->config->get_ldap_link();
- $ldap->cd($this->config->current['BASE']);
- $ldap->search("(&(objectClass=organizationalRole)(cn=$this->cn))", array("cn"));
- $ldap->fetch();
- if ($ldap->count() != 0 && ( $this->dn == 'new' || $this->cn != $this->orig_cn)){
- $message[]= msgPool::duplicated(_("Name"));
- }
-
- return($message);
- }
-
-
- /* Returns list of occupants as <html><option> statements.
- */
- function convert_list()
- {
- $temp= "";
- $icon = " style=\"background-image:url('plugins/generic/images/head.png');\" ";
- foreach ($this->roleOccupant as $key => $dn){
- if(isset($this->roleOccCache[$dn])){
- $entry = $this->roleOccCache[$dn];
- $name = $entry['cn']['0'];
- if(isset($entry['description'][0])){
- $name .= " [".$entry['description'][0]."]";
- }
- }else{
- $name = _("Unknown")." ".$dn;
- }
- $temp.= "<option {$icon} title='{$dn}' value='$key' class='select'>{$name}</option>\n";
- }
- return ($temp);
- }
-
-
- /* Removes the object from the ldap database
- */
- function remove_from_parent()
- {
- plugin::remove_from_parent();
-
- // Remove this object.
- $ldap= $this->config->get_ldap_link();
- $ldap->rmdir($this->dn);
- if (!$ldap->success()){
- msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
- }
-
- // Log action.
- new log("remove","roles/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
-
- // Trigger remove signal
- $this->handle_post_events("remove");
- }
-
-
- /* Saves object modifications
- */
- function save(){
- plugin::save();
-
- /* Save data. Using 'modify' implies that the entry is already present, use 'add' for
- new entries. So do a check first... */
- $ldap = $this->config->get_ldap_link();
- $ldap->cat ($this->dn, array('dn'));
- if ($ldap->fetch()){
- $mode= "modify";
- } else {
- $mode= "add";
- $ldap->cd($this->config->current['BASE']);
- $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
- }
- @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,$this->attributes, "Save via $mode");
-
- // Finally write data with selected 'mode'
- $this->cleanup();
- $ldap->cd ($this->dn);
- $ldap->$mode ($this->attrs);
- if (!$ldap->success()){
- msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(),
- $this->dn, LDAP_MOD, get_class()));
- return (1);
- }
-
- // Send modify/add events
- $this->handle_post_events($mode);
-
- // Update ACL dependencies too
- if($this->dn != $this->orig_dn && $this->orig_dn != "new"){
- $tmp = new acl($this->config,$this->parent,$this->dn);
- $tmp->update_acl_membership($this->orig_dn,$this->dn);
- }
-
- // Log action
- if($mode == "modify"){
- new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- }else{
- new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- }
-
- return 0;
- }
-
-
- /* This avoids that users move themselves out of their rights.
- */
- function allowedBasesToMoveTo()
- {
- $bases = $this->get_allowed_bases();
- return($bases);
- }
-
-
- /* Save HTML inputs
- */
- function save_object()
- {
- plugin::save_object();
- if(isset($_POST['base'])){
- $this->base = get_post('base');
- }
- }
-
-
- function PrepareForCopyPaste($source)
- {
- plugin::PrepareForCopyPaste($source);
-
- /* Load member objects */
- $this->roleOccupant = array();
- if (isset($source['roleOccupant'])){
- foreach ($source['roleOccupant'] as $key => $value){
- if ("$key" != "count"){
- $value= @LDAP::convert($value);
- $this->roleOccupant["$value"]= "$value";
- }
- }
- }
- $this->reload();
- }
-
-
- function getCopyDialog()
- {
- $smarty = get_smarty();
- $smarty->assign("cn", $this->cn);
- $str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE,dirname(__FILE__)));
- $ret = array();
- $ret['string'] = $str;
- $ret['status'] = "";
- return($ret);
- }
-
- function saveCopyDialog()
- {
- if(isset($_POST['cn'])){
- $this->cn = $_POST['cn'];
- }
- }
-
-
- static function plInfo()
- {
- return (array(
- "plShortName" => _("Generic"),
- "plDescription" => _("Role generic"),
- "plSelfModify" => FALSE,
- "plDepends" => array(),
- "plPriority" => 1,
- "plSection" => array("administration"),
- "plCategory" => array("roles" => array("description" => _("Roles"),
- "objectClass" => "organizationalRole")),
- "plProvidedAcls"=> array(
- "cn" => _("Name"),
- "description" => _("Description"),
- "base" => _("Base"),
- "telephoneNumber" => _("Telefon number"),
- "facsimileTelephoneNumber" => _("Fax number"),
- "roleOccupant" => _("Occupants"))
- ));
- }
-}
-
-
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/opsi/admin/opsiLicences/class_opsiLicenceHandler.inc b/gosa-plugins/opsi/admin/opsiLicences/class_opsiLicenceHandler.inc
+++ /dev/null
@@ -1,138 +0,0 @@
-<?php
-
-class opsiLicenceHandler extends gosaSupportDaemon {
-
-
-
- function listLicenses()
- {
- $data = "<header>opsi_getLicensePools_listOfHashes</header>".
- "<source>GOSA</source>".
- "<target>GOSA</target></header>";
- $res = $this->_send($data, TRUE);
-
- }
-
-
- /* @brief Create a license pool at Opsi server.
- * @param licensePoolId The name of the pool (optional).
- * @param description The description of the pool (optional).
- * @param productIds A list of assigned porducts of the pool (optional).
- * @param windowsSoftwareIds A list of windows software IDs associated to the pool (optional).
- */
- function opsi_createLicensePool()
- {
-
- }
-
- /*
- * @brief
- * Delete licnese pool by license pool ID.
- * A pool can only be deleted if there are no software licenses bound to the pool.
- * The fixed parameter deleteLicenses=True specifies that
- * all software licenses bound to the pool are being deleted.
- * @param licensePoolId The name of the pool.
- */
- function opsi_deleteLicensePool()
- {
-
- }
-
-
- /*
- * @brief
- * Create a license contract, create a software
- * license and add the software license to the license pool
- * @param licensePoolId The name of the pool the license should be assigned.
- * @param licenseKey The license key.
- * @param partner Name of the license partner (optional).
- * @param conclusionDate Date of conclusion of license contract (optional)
- * @param notificationDate Date of notification that license is running out soon (optional).
- * @param notes This is the place for some notes (optional)
- * @param softwareLicenseId Identificator of a license (optional).
- * @param licenseTyp Typ of a licnese, either "OEM", "VOLUME" or "RETAIL" (optional).
- * @param maxInstallations The number of clients use this license (optional).
- * @param boundToHost The name of the client the license is bound to (optional).
- * @param expirationDate The date when the license is running down (optional).
- */
- function opsi_createLicense()
- {
-
- }
-
-
- /*
- * @brief Assign a software license to a host
- * @param hostid Something like client_1.intranet.mydomain.de
- * @param licensePoolId The name of the pool.
- */
- function opsi_assignSoftwareLicenseToHost()
- {
-
- }
-
-
- /*
- * @brief Unassign a software license from a host.
- * @param hostid Something like client_1.intranet.mydomain.de
- * @param licensePoolId The name of the pool.
- */
- function opsi_unassignSoftwareLicenseFromHost()
- {}
-
-
- /*
- * @brief Unassign all software licenses from a host
- * @param hostid Something like client_1.intranet.mydomain.de
- */
- function opsi_unassignAllSoftwareLicensesFromHost()
- {}
-
-
- /*
- * @brief Returns expirationDate, boundToHost, maxInstallation, licenseTyp, licensePoolIds and licenseKeys for a given softwareLicense ID.
- * @param softwareLicenseId Identificator of a license.
- */
- function opsi_getSoftwareLicense_hash()
- {}
-
-
- /*
- * @brief Return productIds, windowsSoftwareIds and description for a given licensePoolId
- * @param licensePoolId The name of the pool.
- */
- function opsi_getLicensePool_hash()
- {}
-
-
- /*
- * @brief Returns softwareLicenseId, notes, licenseKey, hostId and licensePoolId for optional given licensePoolId and hostId
- * @param hostid Something like client_1.intranet.mydomain.de (optional).
- * @param licensePoolId The name of the pool (optional).
- */
- function opsi_getSoftwareLicenseUsages_listOfHashes()
- {}
-
-
- /*
- * @brief Return licensePoolId, description, productIds and windowsSoftwareIds for all found license pools.
- */
- function opsi_getLicensePools_listOfHashes()
- {}
-
-
- /* @brief
- * Returns the assigned licensePoolId and licenses,
- * how often the product is installed and at which host
- * and the number of max and remaining installations for a given OPSI product.
- * @param productId Identificator of an OPSI product.
- */
- function opsi_getLicenseInformationForProduct()
- {}
-
-
-
-}
-
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/opsi/admin/opsiLicences/class_opsiLicences.inc b/gosa-plugins/opsi/admin/opsiLicences/class_opsiLicences.inc
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/*
-* This code is part of GOsa (http://www.gosa-project.org)
-* Copyright (C) 2003-2008 GONICUS GmbH
-*
-* ID: $$Id: class_opsiLicenses.inc 13520 2009-03-09 14:54:13Z hickert $$
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-class opsiLicenses extends management
-{
- var $plHeadline= "Opsi";
- var $plDescription= "Opsi licenses";
-
- var $ignore_account = TRUE;
-
- function execute()
- {
- $this->ignore_account = TRUE;
- $si = new opsiLicenceHandler();
- $res = $si->listLicenses();
- print_a($res);
-
- if($si->is_error()){
- echo $si->get_error();
- }
-
- }
-
- function remove_lock() {}
-}
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/opsi/admin/opsiLicences/generic.tpl b/gosa-plugins/opsi/admin/opsiLicences/generic.tpl
+++ /dev/null
@@ -1,85 +0,0 @@
-<table style='width:100%;'>
- <tr>
- <td style='width:50%; vertical-align:top; border-right:1px solid #A0A0A0; padding-right:10px;'>
-
- <h2><img src='plugins/rolemanagement/images/role.png' alt='' class='center'>
- {t}Generic{/t}
- </h2>
-
- <table style='width:100%;'>
- <tr>
- <td>{t}Name{/t}{$must}</td>
- <td>
- {render acl=$cnACL}
- <input type='text' value='{$cn}' name='cn'>
- {/render}
- </td>
- </tr>
- <tr>
- <td>{t}Description{/t}</td>
- <td>
- {render acl=$descriptionACL}
- <input type='text' value='{$description}' name='description'>
- {/render}
- </td>
- </tr>
- <tr>
- <td>
- <div style="height:10px;"></div>
- <label for="base">{t}Base{/t}</label>
- </td>
- <td>
- <div style="height:10px;"></div>
- {render acl=$baseACL}
- <select id="base" size="1" name="base" title="{t}Choose subtree to place user in{/t}">
- {html_options options=$bases selected=$base_select}
- </select>
- {/render}
- {render acl=$baseACL disable_picture='images/lists/folder_grey.png'}
- <input type="image" name="chooseBase" src="images/lists/folder.png" class="center"
- title="{t}Select a base{/t}">
- {/render}
- </td>
- </tr>
- <tr>
- <td colspan="2"><p class="seperator"> </p><br></td>
- </tr>
- <tr>
- <td>{t}Phone number{/t}</td>
- <td>
- {render acl=$telephoneNumberACL}
- <input type='text' value='{$telephoneNumber}' name='telephoneNumber'>
- {/render}
- </td>
- </tr>
- <tr>
- <td>{t}Fax number{/t}</td>
- <td>
- {render acl=$facsimileTelephoneNumberACL}
- <input type='text' value='{$facsimileTelephoneNumber}' name='facsimileTelephoneNumber'>
- {/render}
- </td>
- </tr>
- </table>
-
- </td>
- <td style=' vertical-align:top; padding-left:10px;'>
- <h2><img src='plugins/rolemanagement/images/occupant.png' alt='' class='center'>
- {t}Occupants{/t}
- </h2>
-
-{render acl=$roleOccupantACL}
- <select style="width:100%; height:450px;" id="members" name="members[]" size="15" multiple>
- {$members}
- </select>
-{/render}
- <br>
-{render acl=$roleOccupantACL}
- <input type=submit value="{msgPool type=addButton}" name="edit_membership">
-{/render}
-{render acl=$roleOccupantACL}
- <input type=submit value="{msgPool type=delButton}" name="delete_membership">
-{/render}
- </td>
- </tr>
-</table>
diff --git a/gosa-plugins/opsi/admin/opsiLicences/main.inc b/gosa-plugins/opsi/admin/opsiLicences/main.inc
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/*
- * This code is part of GOsa (http://www.gosa-project.org)
- * Copyright (C) 2003-2008 GONICUS GmbH
- *
- * ID: $$Id: main.inc 13288 2008-12-12 14:54:13Z hickert $$
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-
-// Remove locks created by this plugin
-if ($remove_lock){
- if(session::is_set('opsiLicenses')){
- $macl = session::get('opsiLicenses');
- $macl->remove_lock();
- }
-}
-
-/* Remove this plugin from session
-*/
-if ( $cleanup ){
- $macl = session::get('opsiLicenses');
- $macl->remove_lock();
- session::un_set('opsiLicenses');
-}else{
-
- /* Create object object on demand */
- if (!session::is_set('opsiLicenses')){
- session::set('opsiLicenses',new opsiLicenses($config));
- }
- $opsiLicenses = session::get('opsiLicenses');
-
- /* Execute formular */
- $opsiLicenses->save_object();
- $output= $opsiLicenses->execute ();
-
- /* Page header*/
- if (get_object_info() != ""){
- $display= print_header(get_template_path('plugins/rolemanagement/images/plugin.png'),
- _("Roles"),
- "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".
- LDAP::fix(get_object_info()));
- } else {
- $display= print_header(get_template_path('plugins/rolemanagement/images/plugin.png'), _("Role management"));
- }
-
- $display.= $output;
-
- /* Store changes in session */
- session::set('opsiLicenses',$opsiLicenses);
-}
-
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licenceGeneric.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licenceGeneric.inc
--- /dev/null
@@ -0,0 +1,404 @@
+<?php
+/*
+* This code is part of GOsa (http://www.gosa-project.org)
+* Copyright (C) 2003-2008 GONICUS GmbH
+*
+* ID: $$Id: class_opsiLicenses.inc 13520 2009-03-09 14:54:13Z hickert $$
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+
+class opsiLicens extends plugin {
+
+ // The variables this plugin takes care of.
+ var $cn = "";
+ var $description ="";
+ var $telephoneNumber = "";
+ var $facsimileTelephoneNumber = "";
+
+ // The objects base
+ var $base = "";
+
+ // Keep track if possible ng aming modifications
+ var $orig_dn = "";
+ var $orig_cn = "";
+ var $orig_base = "";
+
+ // The object classes written by this plugin
+ var $objectclasses = array("top","organizationalRole");
+
+ // The list of occupants ([dn])
+ var $roleOccupant = array();
+
+ // The roleOccupant cache, dn=>attrs
+ var $roleOccCache = array();
+
+ // A list of attributes managed by this plugin
+ var $attributes = array("cn","description",
+ "telephoneNumber","facsimileTelephoneNumber","roleOccupant");
+
+
+ /* Initialize the class
+ */
+ function __construct($config,$dn){
+ plugin::plugin($config,$dn);
+ $this->is_account = TRUE;
+
+ // Initialize list of occupants
+ $this->roleOccupant = array();
+ if(isset($this->attrs['roleOccupant'])){
+ for($i=0;$i<$this->attrs['roleOccupant']['count']; $i++){
+ $this->roleOccupant[] = $this->attrs['roleOccupant'][$i];
+ }
+ }
+
+ // Detect the objects base
+ if ($this->dn == "new"){
+ $this->base = session::get('CurrentMainBase');
+ } else {
+ $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("roleRDN"), '/i')."/","",$this->dn);
+ }
+
+ // Keep track of naming attribute modifications
+ $this->orig_base = $this->base;
+ $this->orig_dn = $dn;
+ $this->orig_cn = $this->cn;
+
+ // Reload the occupant cache.
+ $this->reload();
+ }
+
+
+ /* Keep occupant cache up to date.
+ * Else, we may have entries we can't display.
+ */
+ function reload()
+ {
+ // Entries can't be added twice.
+ $attrs = array("description", "objectClass", "uid","cn");
+ $this->roleOccupant = array_unique($this->roleOccupant);
+ $this->roleOccupant = array_values($this->roleOccupant);
+
+ $ldap = $this->config->get_ldap_link();
+ foreach($this->roleOccupant as $dn){
+ if(!isset($this->roleOccCache[$dn])){
+ if($ldap->dn_exists($dn)){
+ $ldap->cat($dn, $attrs);
+
+ $tmp = $ldap->fetch();
+ if(!isset($tmp['cn'])){
+
+ // Extract the namingAttribute out of the dn.
+ $cn = preg_replace("/^[^=]*+=([^,]*).*$/","\\1",$tmp['dn']);
+ if(isset($tmp['uid'])){
+ $cn = $tmp['uid'][0];
+ }
+ if(isset($tmp['description'])){
+ $cn.= " [".$tmp['description'][0]."]";
+ }
+ $tmp['cn'][0] = $cn;
+ }
+
+ $this->roleOccCache[$dn] = $tmp;
+ }
+ }
+ }
+
+ }
+
+
+ function getOccupants(){
+ return($this->roleOccupant);
+ }
+
+ /* Generate HTML output of this plugin.
+ */
+ function execute()
+ {
+ // Get list of possible ldap bases, will be selectable in the ui.
+ $tmp = $this->allowedBasesToMoveTo();
+
+
+ /***************
+ * Dialog handling
+ ***************/
+
+ if(isset($_POST['edit_membership']) && !$this->dialog instanceOf plugin){
+ $this->dialog = new occupantSelect($this->config,$this->dn,$this);
+ }
+ if(isset($_POST['delete_membership']) && !$this->dialog instanceOf plugin){
+ if(isset($_POST['members'])){
+ foreach($_POST['members'] as $id){
+ if(isset($this->roleOccupant[$id])){
+ unset($this->roleOccupant[$id]);
+ }
+ }
+ $this->reload();
+ }
+ }
+
+ if(isset($_POST['add_object_cancel']) && $this->dialog instanceOf plugin){
+ $this->dialog = NULL;
+ }
+ if(isset($_POST['add_object_finish']) && $this->dialog instanceOf plugin){
+ $ret = $this->dialog->save();
+ foreach($ret as $key => $entry){
+ $this->roleOccupant[] = $entry['dn'];
+ $this->roleOccCache[$entry['dn']] = $entry['attrs'];
+ }
+ $this->reload();
+ $this->dialog = NULL;
+ }
+
+ if($this->dialog instanceOf plugin){
+ $this->dialog->save_object();
+ return($this->dialog->execute());
+ }
+
+
+ /***************
+ * Template handling
+ ***************/
+
+ // Get smarty instance and assign required variables.
+ $smarty = get_smarty();
+ $smarty->assign("bases", $tmp);
+ $smarty->assign("base_select",$this->base);
+ $smarty->assign("members",$this->convert_list());
+ foreach($this->attributes as $attr){
+ $smarty->assign($attr,$this->$attr);
+ }
+
+ // Assign current permissions for each attribute.
+ $tmp = $this->plInfo();
+ foreach($tmp['plProvidedAcls'] as $attr => $desc){
+ $smarty->assign($attr."ACL",$this->getacl($attr));
+ }
+ return($smarty->fetch(get_template_path('roleGeneric.tpl',TRUE,dirname(__FILE__))));
+ }
+
+
+ /* Check user input and return a list of 'invalid input' messages.
+ */
+ function check()
+ {
+ $message = plugin::check();
+
+ // Set the new acl base
+ if($this->dn == "new") {
+ $this->set_acl_base($this->base);
+ }
+
+ // Check if we are allowed to create/move this user
+ if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
+ $message[]= msgPool::permCreate();
+ }elseif($this->orig_dn != "new" &&
+ !$this->acl_is_moveable($this->base) &&
+ ($this->orig_base != $this->base || $this->orig_cn != $this->cn )){
+ $message[]= msgPool::permMove();
+ }
+
+ /* must: cn */
+ if ($this->cn == ""){
+ $message[]= msgPool::required(_("Name"));
+ }
+
+ // Check if this name is uniq for roles.
+ $ldap= $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=organizationalRole)(cn=$this->cn))", array("cn"));
+ $ldap->fetch();
+ if ($ldap->count() != 0 && ( $this->dn == 'new' || $this->cn != $this->orig_cn)){
+ $message[]= msgPool::duplicated(_("Name"));
+ }
+
+ return($message);
+ }
+
+
+ /* Returns list of occupants as <html><option> statements.
+ */
+ function convert_list()
+ {
+ $temp= "";
+ $icon = " style=\"background-image:url('plugins/generic/images/head.png');\" ";
+ foreach ($this->roleOccupant as $key => $dn){
+ if(isset($this->roleOccCache[$dn])){
+ $entry = $this->roleOccCache[$dn];
+ $name = $entry['cn']['0'];
+ if(isset($entry['description'][0])){
+ $name .= " [".$entry['description'][0]."]";
+ }
+ }else{
+ $name = _("Unknown")." ".$dn;
+ }
+ $temp.= "<option {$icon} title='{$dn}' value='$key' class='select'>{$name}</option>\n";
+ }
+ return ($temp);
+ }
+
+
+ /* Removes the object from the ldap database
+ */
+ function remove_from_parent()
+ {
+ plugin::remove_from_parent();
+
+ // Remove this object.
+ $ldap= $this->config->get_ldap_link();
+ $ldap->rmdir($this->dn);
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
+
+ // Log action.
+ new log("remove","roles/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
+ // Trigger remove signal
+ $this->handle_post_events("remove");
+ }
+
+
+ /* Saves object modifications
+ */
+ function save(){
+ plugin::save();
+
+ /* Save data. Using 'modify' implies that the entry is already present, use 'add' for
+ new entries. So do a check first... */
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cat ($this->dn, array('dn'));
+ if ($ldap->fetch()){
+ $mode= "modify";
+ } else {
+ $mode= "add";
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
+ }
+ @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,$this->attributes, "Save via $mode");
+
+ // Finally write data with selected 'mode'
+ $this->cleanup();
+ $ldap->cd ($this->dn);
+ $ldap->$mode ($this->attrs);
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(),
+ $this->dn, LDAP_MOD, get_class()));
+ return (1);
+ }
+
+ // Send modify/add events
+ $this->handle_post_events($mode);
+
+ // Update ACL dependencies too
+ if($this->dn != $this->orig_dn && $this->orig_dn != "new"){
+ $tmp = new acl($this->config,$this->parent,$this->dn);
+ $tmp->update_acl_membership($this->orig_dn,$this->dn);
+ }
+
+ // Log action
+ if($mode == "modify"){
+ new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
+ return 0;
+ }
+
+
+ /* This avoids that users move themselves out of their rights.
+ */
+ function allowedBasesToMoveTo()
+ {
+ $bases = $this->get_allowed_bases();
+ return($bases);
+ }
+
+
+ /* Save HTML inputs
+ */
+ function save_object()
+ {
+ plugin::save_object();
+ if(isset($_POST['base'])){
+ $this->base = get_post('base');
+ }
+ }
+
+
+ function PrepareForCopyPaste($source)
+ {
+ plugin::PrepareForCopyPaste($source);
+
+ /* Load member objects */
+ $this->roleOccupant = array();
+ if (isset($source['roleOccupant'])){
+ foreach ($source['roleOccupant'] as $key => $value){
+ if ("$key" != "count"){
+ $value= @LDAP::convert($value);
+ $this->roleOccupant["$value"]= "$value";
+ }
+ }
+ }
+ $this->reload();
+ }
+
+
+ function getCopyDialog()
+ {
+ $smarty = get_smarty();
+ $smarty->assign("cn", $this->cn);
+ $str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE,dirname(__FILE__)));
+ $ret = array();
+ $ret['string'] = $str;
+ $ret['status'] = "";
+ return($ret);
+ }
+
+ function saveCopyDialog()
+ {
+ if(isset($_POST['cn'])){
+ $this->cn = $_POST['cn'];
+ }
+ }
+
+
+ static function plInfo()
+ {
+ return (array(
+ "plShortName" => _("Generic"),
+ "plDescription" => _("Role generic"),
+ "plSelfModify" => FALSE,
+ "plDepends" => array(),
+ "plPriority" => 1,
+ "plSection" => array("administration"),
+ "plCategory" => array("roles" => array("description" => _("Roles"),
+ "objectClass" => "organizationalRole")),
+ "plProvidedAcls"=> array(
+ "cn" => _("Name"),
+ "description" => _("Description"),
+ "base" => _("Base"),
+ "telephoneNumber" => _("Telefon number"),
+ "facsimileTelephoneNumber" => _("Fax number"),
+ "roleOccupant" => _("Occupants"))
+ ));
+ }
+}
+
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenceHandler.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenceHandler.inc
--- /dev/null
@@ -0,0 +1,138 @@
+<?php
+
+class opsiLicenceHandler extends gosaSupportDaemon {
+
+
+
+ function listLicenses()
+ {
+ $data = "<header>opsi_getLicensePools_listOfHashes</header>".
+ "<source>GOSA</source>".
+ "<target>GOSA</target></header>";
+ $res = $this->_send($data, TRUE);
+
+ }
+
+
+ /* @brief Create a license pool at Opsi server.
+ * @param licensePoolId The name of the pool (optional).
+ * @param description The description of the pool (optional).
+ * @param productIds A list of assigned porducts of the pool (optional).
+ * @param windowsSoftwareIds A list of windows software IDs associated to the pool (optional).
+ */
+ function opsi_createLicensePool()
+ {
+
+ }
+
+ /*
+ * @brief
+ * Delete licnese pool by license pool ID.
+ * A pool can only be deleted if there are no software licenses bound to the pool.
+ * The fixed parameter deleteLicenses=True specifies that
+ * all software licenses bound to the pool are being deleted.
+ * @param licensePoolId The name of the pool.
+ */
+ function opsi_deleteLicensePool()
+ {
+
+ }
+
+
+ /*
+ * @brief
+ * Create a license contract, create a software
+ * license and add the software license to the license pool
+ * @param licensePoolId The name of the pool the license should be assigned.
+ * @param licenseKey The license key.
+ * @param partner Name of the license partner (optional).
+ * @param conclusionDate Date of conclusion of license contract (optional)
+ * @param notificationDate Date of notification that license is running out soon (optional).
+ * @param notes This is the place for some notes (optional)
+ * @param softwareLicenseId Identificator of a license (optional).
+ * @param licenseTyp Typ of a licnese, either "OEM", "VOLUME" or "RETAIL" (optional).
+ * @param maxInstallations The number of clients use this license (optional).
+ * @param boundToHost The name of the client the license is bound to (optional).
+ * @param expirationDate The date when the license is running down (optional).
+ */
+ function opsi_createLicense()
+ {
+
+ }
+
+
+ /*
+ * @brief Assign a software license to a host
+ * @param hostid Something like client_1.intranet.mydomain.de
+ * @param licensePoolId The name of the pool.
+ */
+ function opsi_assignSoftwareLicenseToHost()
+ {
+
+ }
+
+
+ /*
+ * @brief Unassign a software license from a host.
+ * @param hostid Something like client_1.intranet.mydomain.de
+ * @param licensePoolId The name of the pool.
+ */
+ function opsi_unassignSoftwareLicenseFromHost()
+ {}
+
+
+ /*
+ * @brief Unassign all software licenses from a host
+ * @param hostid Something like client_1.intranet.mydomain.de
+ */
+ function opsi_unassignAllSoftwareLicensesFromHost()
+ {}
+
+
+ /*
+ * @brief Returns expirationDate, boundToHost, maxInstallation, licenseTyp, licensePoolIds and licenseKeys for a given softwareLicense ID.
+ * @param softwareLicenseId Identificator of a license.
+ */
+ function opsi_getSoftwareLicense_hash()
+ {}
+
+
+ /*
+ * @brief Return productIds, windowsSoftwareIds and description for a given licensePoolId
+ * @param licensePoolId The name of the pool.
+ */
+ function opsi_getLicensePool_hash()
+ {}
+
+
+ /*
+ * @brief Returns softwareLicenseId, notes, licenseKey, hostId and licensePoolId for optional given licensePoolId and hostId
+ * @param hostid Something like client_1.intranet.mydomain.de (optional).
+ * @param licensePoolId The name of the pool (optional).
+ */
+ function opsi_getSoftwareLicenseUsages_listOfHashes()
+ {}
+
+
+ /*
+ * @brief Return licensePoolId, description, productIds and windowsSoftwareIds for all found license pools.
+ */
+ function opsi_getLicensePools_listOfHashes()
+ {}
+
+
+ /* @brief
+ * Returns the assigned licensePoolId and licenses,
+ * how often the product is installed and at which host
+ * and the number of max and remaining installations for a given OPSI product.
+ * @param productId Identificator of an OPSI product.
+ */
+ function opsi_getLicenseInformationForProduct()
+ {}
+
+
+
+}
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicences.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicences.inc
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+/*
+* This code is part of GOsa (http://www.gosa-project.org)
+* Copyright (C) 2003-2008 GONICUS GmbH
+*
+* ID: $$Id: class_opsiLicenses.inc 13520 2009-03-09 14:54:13Z hickert $$
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+class opsiLicenses extends management
+{
+ var $plHeadline= "Opsi";
+ var $plDescription= "Opsi licenses";
+
+ var $ignore_account = TRUE;
+
+ function execute()
+ {
+ $this->ignore_account = TRUE;
+ $si = new opsiLicenceHandler();
+ $res = $si->listLicenses();
+ print_a($res);
+
+ if($si->is_error()){
+ echo $si->get_error();
+ }
+
+ }
+
+ function remove_lock() {}
+}
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/generic.tpl b/gosa-plugins/opsi/admin/opsiLicenses/generic.tpl
--- /dev/null
@@ -0,0 +1,85 @@
+<table style='width:100%;'>
+ <tr>
+ <td style='width:50%; vertical-align:top; border-right:1px solid #A0A0A0; padding-right:10px;'>
+
+ <h2><img src='plugins/rolemanagement/images/role.png' alt='' class='center'>
+ {t}Generic{/t}
+ </h2>
+
+ <table style='width:100%;'>
+ <tr>
+ <td>{t}Name{/t}{$must}</td>
+ <td>
+ {render acl=$cnACL}
+ <input type='text' value='{$cn}' name='cn'>
+ {/render}
+ </td>
+ </tr>
+ <tr>
+ <td>{t}Description{/t}</td>
+ <td>
+ {render acl=$descriptionACL}
+ <input type='text' value='{$description}' name='description'>
+ {/render}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div style="height:10px;"></div>
+ <label for="base">{t}Base{/t}</label>
+ </td>
+ <td>
+ <div style="height:10px;"></div>
+ {render acl=$baseACL}
+ <select id="base" size="1" name="base" title="{t}Choose subtree to place user in{/t}">
+ {html_options options=$bases selected=$base_select}
+ </select>
+ {/render}
+ {render acl=$baseACL disable_picture='images/lists/folder_grey.png'}
+ <input type="image" name="chooseBase" src="images/lists/folder.png" class="center"
+ title="{t}Select a base{/t}">
+ {/render}
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><p class="seperator"> </p><br></td>
+ </tr>
+ <tr>
+ <td>{t}Phone number{/t}</td>
+ <td>
+ {render acl=$telephoneNumberACL}
+ <input type='text' value='{$telephoneNumber}' name='telephoneNumber'>
+ {/render}
+ </td>
+ </tr>
+ <tr>
+ <td>{t}Fax number{/t}</td>
+ <td>
+ {render acl=$facsimileTelephoneNumberACL}
+ <input type='text' value='{$facsimileTelephoneNumber}' name='facsimileTelephoneNumber'>
+ {/render}
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ <td style=' vertical-align:top; padding-left:10px;'>
+ <h2><img src='plugins/rolemanagement/images/occupant.png' alt='' class='center'>
+ {t}Occupants{/t}
+ </h2>
+
+{render acl=$roleOccupantACL}
+ <select style="width:100%; height:450px;" id="members" name="members[]" size="15" multiple>
+ {$members}
+ </select>
+{/render}
+ <br>
+{render acl=$roleOccupantACL}
+ <input type=submit value="{msgPool type=addButton}" name="edit_membership">
+{/render}
+{render acl=$roleOccupantACL}
+ <input type=submit value="{msgPool type=delButton}" name="delete_membership">
+{/render}
+ </td>
+ </tr>
+</table>
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/main.inc b/gosa-plugins/opsi/admin/opsiLicenses/main.inc
--- /dev/null
@@ -0,0 +1,67 @@
+<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id: main.inc 13288 2008-12-12 14:54:13Z hickert $$
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+// Remove locks created by this plugin
+if ($remove_lock){
+ if(session::is_set('opsiLicenses')){
+ $macl = session::get('opsiLicenses');
+ $macl->remove_lock();
+ }
+}
+
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ $macl = session::get('opsiLicenses');
+ $macl->remove_lock();
+ session::un_set('opsiLicenses');
+}else{
+
+ /* Create object object on demand */
+ if (!session::is_set('opsiLicenses')){
+ session::set('opsiLicenses',new opsiLicenses($config));
+ }
+ $opsiLicenses = session::get('opsiLicenses');
+
+ /* Execute formular */
+ $opsiLicenses->save_object();
+ $output= $opsiLicenses->execute ();
+
+ /* Page header*/
+ if (get_object_info() != ""){
+ $display= print_header(get_template_path('plugins/rolemanagement/images/plugin.png'),
+ _("Roles"),
+ "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".
+ LDAP::fix(get_object_info()));
+ } else {
+ $display= print_header(get_template_path('plugins/rolemanagement/images/plugin.png'), _("Role management"));
+ }
+
+ $display.= $output;
+
+ /* Store changes in session */
+ session::set('opsiLicenses',$opsiLicenses);
+}
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>