[debian-edu-commits] r78794 - in branches/wheezy/debian-edu-config/share/debian-edu-config: . d-i netgroups netgroups/admin netgroups/admin/netgroups netgroups/admin/netgroups/memberNisnetgroupSelect netgroups/admin/netgroups/tripleSelect netgroups/admin/systems netgroups/admin/systems/netgroups netgroups/html netgroups/html/images netgroups/locale netgroups/locale/de netgroups/locale/de/LC_MESSAGES netgroups/locale/es netgroups/locale/es/LC_MESSAGES netgroups/locale/fr netgroups/locale/fr/LC_MESSAGES netgroups/locale/nb netgroups/locale/nb/LC_MESSAGES netgroups/personal netgroups/personal/netgroups
schweer-guest at alioth.debian.org
schweer-guest at alioth.debian.org
Sun Jan 20 17:39:40 UTC 2013
Author: schweer-guest
Date: 2013-01-20 17:39:39 +0000 (Sun, 20 Jan 2013)
New Revision: 78794
Added:
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/class_netgroup.inc
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/class_netgroupManagement.inc
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/generic.tpl
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/main.inc
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/class_memberNisnetgroupSelect.inc
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-filter.xml
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.tpl
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/netgroup-filter.xml
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/netgroup-list.tpl
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/netgroup-list.xml
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tabs_netgroup.inc
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/class_filterTriplesLDAP.inc
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/class_tripleSelect.inc
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/triple-filter.xml
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/triple-list.tpl
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/triple-list.xml
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/systems/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/systems/netgroups/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/systems/netgroups/class_netgroupSystem.inc
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/systems/netgroups/netgroupSystem.tpl
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/contrib/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/help/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/html/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/html/images/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/html/images/plugin.png
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/html/images/select_netgroup.png
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/de/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/de/LC_MESSAGES/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/de/LC_MESSAGES/messages.po
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/es/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/es/LC_MESSAGES/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/es/LC_MESSAGES/messages.po
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/fr/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/fr/LC_MESSAGES/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/fr/LC_MESSAGES/messages.po
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/messages.po
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/nb/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/nb/LC_MESSAGES/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/nb/LC_MESSAGES/messages.po
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/personal/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/personal/netgroups/
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/personal/netgroups/class_netgroupAccount.inc
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/personal/netgroups/netgroupAccount.tpl
branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/plugin.dsc
Modified:
branches/wheezy/debian-edu-config/share/debian-edu-config/d-i/finish-install
Log:
provide and install the gosa netgroups plugin (gonicus svn co)
Modified: branches/wheezy/debian-edu-config/share/debian-edu-config/d-i/finish-install
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/d-i/finish-install 2013-01-20 17:21:35 UTC (rev 78793)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/d-i/finish-install 2013-01-20 17:39:39 UTC (rev 78794)
@@ -65,6 +65,7 @@
) < /dev/null > /dev/null 2>&1 3>&1 4>&1 5>&1 6>&1 &
epid=$!
+
# Make the installation look more like a finished system, to make sure
# debconf-get-selections --installer work.
. /usr/lib/finish-install.d/94save-logs
@@ -110,3 +111,10 @@
if LANG=C chroot /target fuser -mv $mountpoints 2>&1 | egrep -qv 'USER|mount |Cannot open ' ; then
log "error: some processes blocking d-i from umounting /target/"
fi
+
+# FIXME: Check this for jessie
+# Install gosa-plugin-netgroups provided by d-e-c
+in-target update-gosa install /usr/share/debian-edu-config/netgroups/plugin.dsc
+log "Install gosa netgroups plugin"
+
+
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/class_netgroup.inc
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/class_netgroup.inc (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/class_netgroup.inc 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,886 @@
+<?php
+
+/* This code is part of GOsa-contrib (https://oss.gonicus.de/labs/gosa-contrib)
+ * Copyright (C) 2011 Alejandro Escanero Blanco (aescanero at gmail.com)
+ *
+ * Ported to GOsa 2.7 by Fabian Hickert (hickert at gonicus.de)
+ * Copyright (C) 2012 GONICUS GmbH
+ *
+ * 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 netgroup extends plugin {
+
+ var $cn = "";
+ var $description = "";
+ var $objectInfo = array();
+ var $ignore_account = TRUE;
+
+ var $netgroups = array();
+ var $netgroups_used_by_some = array();
+
+ var $triples = array();
+ var $triples_used_by_some = array();
+
+ var $nisNetgroupTriple = array();
+ var $memberNisNetgroup = array();
+
+ /* Helpers */
+ var $base = "";
+ var $orig_dn = "";
+ var $orig_cn = "";
+ var $orig_base = "";
+ var $userSelect = FALSE;
+ var $dialog;
+ var $view_logged = FALSE;
+ var $baseSelector;
+
+ /* attribute list for save action */
+ var $attributes = array("cn", "description", "nisNetgroupTriple", "memberNisNetgroup");
+ var $objectclasses = array("top", "nisNetgroup");
+ var $multiple_support = TRUE;
+
+ //var $CopyPasteVars = array("");
+
+
+ /* Constructor which load object attributes aso.
+ * */
+ function netgroup(&$config, $dn= NULL) {
+
+ plugin::plugin($config, $dn);
+ $this->objectInfo = array("triple" => array(), "groups" => array());
+ $this->orig_dn = $dn;
+ $this->orig_cn = $this->cn;
+
+ // Extract triple informations
+ // . (machine, user, domain)
+ if (isset($this->attrs['nisNetgroupTriple']["count"])) {
+ $tmp = array();
+ for ($i = 0; $i < $this->attrs['nisNetgroupTriple']['count']; $i++) {
+ if (preg_match("/^\((\S+),\-?,(\S*)\)$/", $this->attrs['nisNetgroupTriple'][$i], $matches)) {
+
+ // Skip non-fqdn entries
+ if(strpos($matches[1], ".") !== FALSE){
+ $this->addTriple($matches[1], NULL, $matches[2]);
+ }
+ }
+ if (preg_match("/^\(\-?,(\S+),(\S*)\)$/", $this->attrs['nisNetgroupTriple'][$i], $matches)) {
+ $this->addTriple(NULL, $matches[1], $matches[2]);
+ }
+ }
+ }
+
+ /* Get netgroups list and put it in $this->netgroups */
+ if (isset($this->attrs['memberNisNetgroup'][0])) {
+ for ($i = 0; $i < $this->attrs['memberNisNetgroup']['count']; $i++) {
+ $this->addNisGroup($this->attrs['memberNisNetgroup'][$i]);
+ }
+ }
+
+ if ($this->dn == "new") {
+ if (session::is_set('CurrentMainBase')) {
+ $this->base = session::get('CurrentMainBase');
+ } else {
+ $ui = get_userinfo();
+ $this->base = dn2base($ui->dn);
+ }
+ } else {
+
+ /* Get object base */
+ $this->base = preg_replace("/^[^,]+," . preg_quote(get_ou("netgroupSystem", "netgroupSystemRDN"),'/') . "/i", "", $this->dn);
+ }
+ $this->orig_base = $this->base;
+
+ /* Instanciate base selector */
+ $this->baseSelector = new baseSelector($this->get_allowed_bases(), $this->base);
+ $this->baseSelector->setSubmitButton(false);
+ $this->baseSelector->setHeight(300);
+ $this->baseSelector->update(true);
+
+ // Prepare lists
+ $this->memberList = new sortableListing(array(),array(), FALSE);
+ $this->memberList->setDeleteable(true);
+ $this->memberList->setInstantDelete(false);
+ $this->memberList->setEditable(false);
+ $this->memberList->setWidth("100%");
+ $this->memberList->setHeight("300px");
+ $this->memberList->setColspecs(array('*','*','*','*'));
+ $this->memberList->setHeader(array("-",_("Name"),_("Description"),_("Domain")));
+ $this->memberList->setDefaultSortColumn(1);
+ }
+
+
+ /* Generate the plugin gui, handle posts and fill lists.
+ * */
+ function execute() {
+
+ // Call parent execute
+ plugin::execute();
+
+ // Log view
+ if ($this->is_account && !$this->view_logged) {
+ $this->view_logged = TRUE;
+ new log("view", "netgroups/" . get_class($this), $this->dn);
+ }
+
+ // Set list Acls
+ $this->memberList->setAcl($this->getacl("triples"));
+
+ // Add selected objects
+ if (isset($_POST["edit_membership"]) && preg_match("/w/", $this->getacl("triples"))) {
+ $skip = array();
+ foreach($this->triples as $key => $data){
+ if(isset($this->objectInfo['triple'][$key]['data'])){
+ $skip[] = $this->objectInfo['triple'][$key]['data']['dn'];
+ }
+ }
+ foreach($this->netgroups as $key => $data){
+ if(isset($this->objectInfo['groups'][$key]['data'])){
+ $skip[] = $this->objectInfo['groups'][$key]['data']['dn'];
+ }
+ }
+ $skip[] = $this->dn;
+ session::set('filterBlacklist', array("dn" => $skip));
+ $this->userSelect = new tripleSelect($this->config, get_userinfo(), $this->dn);
+ $this->dialog = TRUE;
+ }
+
+ // Close add-dialog
+ if (isset($_POST["add_triples_cancel"])) {
+ $this->userSelect = NULL;
+ $this->dialog = FALSE;
+ }
+
+ // Add to netgroup
+ if (isset($_POST['add_triples_finish']) && $this->userSelect) {
+ $users = $this->userSelect->detectPostActions();
+ if (isset($users['targets'])) {
+ $headpage = $this->userSelect->getHeadpage();
+ foreach ($users['targets'] as $dn) {
+ $attrs = $headpage->getEntry($dn);
+ $value = "";
+ $objectClass = "posixAccount";
+ if(in_array("posixAccount", $attrs['objectClass'])){
+ $this->addTriple(NULL, $attrs['uid'][0], '', $attrs);
+ }else if(in_array("nisNetgroup", $attrs['objectClass'])){
+ $this->addNisGroup($attrs['cn'][0]);
+ }else{
+ $this->addTriple($attrs['cn'][0], NULL, '', $attrs);
+ }
+ }
+ }
+ $this->userSelect = NULL;
+ $this->dialog = FALSE;
+ }
+
+ // Render the user selection
+ if ($this->userSelect) {
+ return($this->userSelect->execute());
+ }
+
+ // Assign smarty vars
+ $smarty = get_smarty();
+ $smarty->assign("base", $this->baseSelector->render());
+ foreach ($this->attributes as $val) {
+ $smarty->assign("$val", $this->$val);
+ }
+ $tmp = $this->plInfo();
+ foreach ($tmp['plProvidedAcls'] as $name => $translation) {
+ $smarty->assign($name . "ACL", $this->getacl($name));
+ }
+ if ($this->acl_is_writeable("base")) {
+ $smarty->assign("baseSelect", true);
+ } else {
+ $smarty->assign("baseSelect", false);
+ }
+ $smarty->assign("multiple_support", $this->multiple_support_active);
+ foreach ($this->attributes as $val) {
+ if (in_array($val, $this->multi_boxes)) {
+ $smarty->assign("use_" . $val, TRUE);
+ } else {
+ $smarty->assign("use_" . $val, FALSE);
+ }
+ }
+ foreach (array("base") as $val) {
+ if (in_array($val, $this->multi_boxes)) {
+ $smarty->assign("use_" . $val, TRUE);
+ } else {
+ $smarty->assign("use_" . $val, FALSE);
+ }
+ }
+
+ // Fill the list
+ $data = $lData = array();
+ foreach($this->triples_used_by_some as $key => $pattern){
+ $s_key = "t_{$key}";
+ $data[$s_key] = $pattern;
+ $list_data = $this->objectInfo['triple'][$key]['list_data'];
+ for($i=1;$i<4;$i++){
+ $list_data[$i] = "<font color='grey'>".$list_data[$i]."</font>";
+ }
+ $lData[$s_key] = array('data'=> $list_data);
+ }
+ foreach($this->netgroups_used_by_some as $key => $pattern){
+ $s_key = "g_{$key}";
+ $data[$s_key] = $pattern;
+ $list_data = $this->objectInfo['groups'][$key]['list_data'];
+ for($i=1;$i<4;$i++){
+ $list_data[$i] = "<font color='grey'>".$list_data[$i]."</font>";
+ }
+ $lData[$s_key] = array('data'=> $list_data);
+ }
+ foreach($this->netgroups as $key => $pattern){
+ $s_key = "g_{$key}";
+ $data[$s_key] = $pattern;
+ $lData[$s_key] = array('data'=> $this->objectInfo['groups'][$key]['list_data']);
+ }
+ foreach($this->triples as $key => $pattern){
+ $s_key = "t_{$key}";
+ $data[$s_key] = $pattern;
+ $lData[$s_key] = array('data'=> $this->objectInfo['triple'][$key]['list_data']);
+ }
+ $this->memberList->setListData($data, $lData);
+ $this->memberList->update();
+ $smarty->assign("memberList", $this->memberList->render());
+ return($smarty->fetch(get_template_path('generic.tpl', TRUE)));
+ }
+
+
+ /* Returns an image for the given objectClass array.
+ * This is used to generated the list enties
+ * */
+ function getImageForOc($objectClasses){
+ if(in_array("goServer", $objectClasses)){
+ return(image("plugins/systems/images/select_server.png"));
+ }
+ if(in_array("gotoWorkstation", $objectClasses)){
+ return(image("plugins/systems/images/select_workstation.png"));
+ }
+ if(in_array("gotoTerminal", $objectClasses)){
+ return(image("plugins/systems/images/select_terminal.png"));
+ }
+ if(in_array("ieee802Device", $objectClasses)){
+ return(image("plugins/systems/images/select_component.png"));
+ }
+ if(in_array("posixAccount", $objectClasses)){
+ return(image("plugins/users/images/select_user.png"));
+ }
+ if(in_array("nisNetgroup", $objectClasses)){
+ return(image("plugins/netgroups/images/select_netgroup.png"));
+ }
+ }
+
+
+ /* This removes a triple from the list/object
+ * */
+ function removeTriple($name){
+ if(isset($this->triples[$name])){
+ unset($this->triples[$name]);
+ }
+ if(isset($this->triples_used_by_some[$name])){
+ unset($this->triples_used_by_some[$name]);
+ }
+ unset($this->objectInfo['triple'][$name]);
+ }
+
+
+ /* Returns the dns-domain name used by the given hostname
+ * If no domainname could be identified, NULL is returned
+ * */
+ function getDNSZoneForHost($host)
+ {
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=dNSZone)(relativeDomainName=".$host.")(aRecord=*))", array("zoneName"));
+ while ($attrs = $ldap->fetch()) {
+ return($attrs['zoneName'][0]);
+ }
+ return(NULL);
+ }
+
+
+ /* Adds a new triple the the list/object
+ * This method also tries to resolve the hosts domain-name.
+ * */
+ function addTriple($host, $user, $nis_domain, $attrs = NULL)
+ {
+ $fqdn = "";
+ $domain = "";
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ if($host){
+ $attributes = array("dn", "cn", "description", "objectClass");
+
+ // Split name into host and domain
+ if(strpos($host, ".") === FALSE){
+ $domain = $this->getDNSZoneForHost($host);
+ if(!$domain){
+ msg_dialog::display(_("Failed to add triple"), sprintf(_("Unable to detect FQDN for host '%s'!"), $host), ERROR_DIALOG);
+ return;
+ }
+ }else{
+ $domain = preg_replace("/^[^\.]*+\./", "", $host);
+ $host = preg_replace("/\..*/", "", $host);
+ }
+
+ $fqdn = "{$host}.{$domain}";
+ if(!$attrs){
+ $ldap->search("(&(|(objectClass=gotoTerminal)(objectClass=gotoWorkstation)(objectClass=goServer)".
+ "(objectClass=GOhard)(objectClass=ieee802Device))(|(cn=".normalizeldap($host).")(cn=".normalizeldap($fqdn).")))");
+ if($ldap->count()){
+ $attrs = $ldap->fetch();
+ }
+ }
+ $name = $fqdn;
+ }else if($user){
+ $attributes = array("dn", "cn", "uid", "sn", "givenName", "objectClass");
+ if(!$attrs){
+ $ldap->search("(&(objectClass=posixAccount)(uid=".normalizeldap($user)."))");
+ if($ldap->count()){
+ $attrs = $ldap->fetch();
+ }
+ }
+ $name = $user;
+ }else{
+ return "?";
+ }
+
+ $this->removeTriple($name);
+ $this->triples[$name] = array(
+ "host" => $host,
+ "user" => $user,
+ "domain" => $domain,
+ "fqdn" => $fqdn,
+ "nis_domain" => "");
+
+ if($attrs){
+ $type = $this->getImageForOc($attrs['objectClass']);
+ $this->objectInfo['triple'][$name]["data"] = $attrs;
+ if($user){
+ $this->objectInfo['triple'][$name]["list_data"] = array($type, $attrs['uid'][0], $attrs['cn'][0], $domain);
+ }else{
+ $desc = " ";
+ if(isset($attrs['description'][0])){
+ $desc = $attrs['description'][0];
+ }
+ if(!$domain){
+ $domain = " ";
+ }
+ $this->objectInfo['triple'][$name]["list_data"] = array($type, $host, $desc, $domain);
+ }
+ }else{
+ $this->objectInfo['triple'][$name]["list_data"] = array("?", $name, " ", $domain);
+ }
+ }
+
+
+ /* Removes a nis-group from this object
+ * */
+ function removeNisGroup($name){
+ if(isset($this->netgroups[$name])){
+ unset($this->netgroups[$name]);
+ }
+ if(isset($this->netgroups_used_by_some[$name])){
+ unset($this->netgroups_used_by_some[$name]);
+ }
+ unset($this->objectInfo['groups'][$name]);
+ }
+
+
+ /* Adds a new nis-group to this object
+ * */
+ function addNisGroup($name)
+ {
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $attributes = array("dn", "cn", "description", "objectClass");
+ $ldap->search("(&(objectClass=nisNetgroup)(cn=".normalizeldap($name)."))");
+ $this->removeNisGroup($name);
+ $this->netgroups[$name] = $name;
+ if($ldap->count()){
+ while($attrs = $ldap->fetch()){
+ $desc = " ";
+ if(isset($attrs['description'][0])){
+ $desc = $attrs['description'][0];
+ }
+ $type = $this->getImageForOc($attrs['objectClass']);
+ $this->objectInfo['groups'][$name]["data"] = $attrs;
+ $this->objectInfo['groups'][$name]["list_data"] = array($type, $attrs['cn'][0], $desc, " ");
+ }
+ }else{
+ $this->objectInfo['groups'][$name]["list_data"] = array("?", $name, " ", " ");
+ }
+ }
+
+
+ /* Delete this object and its references
+ * */
+ 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, LDAP_DEL, get_class()));
+ }
+
+ new log("remove", "netgroups/" . get_class($this), $this->dn, array_keys($this->attrs), $ldap->get_error());
+
+ // Delete references to object netgroups
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=gosaGroupOfNames)(memberNisNetgroup=" . LDAP::prepare4filter($this->dn) . "))", array("cn"));
+ while ($ldap->fetch()) {
+ $og = new ogroup($this->config, $ldap->getDN());
+ unset($og->member[$this->dn]);
+ $og->save();
+ }
+
+ // Remove ACL dependencies, too
+ acl::remove_acl_for($this->dn);
+
+ // Send signal to the world that we've done
+ $this->handle_post_events("remove");
+ }
+
+
+ /* Act and HTML posts
+ * */
+ function save_object() {
+
+ if (isset($_POST['nisnetgroupedit'])) {
+
+ // Act on list actions (delete)
+ $this->memberList->save_object();
+ $action = $this->memberList->getAction();
+ if(isset($action['action']) && $action['action'] == 'delete'){
+ foreach($action['targets'] as $id){
+ $entry = $this->memberList->getKey($id);
+ if(preg_match("/^t_/", $entry)){
+ $this->removeTriple(preg_replace("/^t_/","",$entry));
+ }else{
+ $this->removeNisGroup(preg_replace("/^g_/","",$entry));
+ }
+ }
+ }
+
+ /* Create a base backup and reset the
+ base directly after calling plugin::save_object();
+ Base will be set seperatly a few lines below */
+ $base_tmp = $this->base;
+ plugin::save_object();
+ $this->base = $base_tmp;
+
+ /* Refresh base */
+ if ($this->acl_is_moveable($this->base)) {
+ if (!$this->baseSelector->update()) {
+ msg_dialog::display(_("Error"), msgPool::permMove(), ERROR_DIALOG);
+ }
+ if ($this->base != $this->baseSelector->getBase()) {
+ $this->base = $this->baseSelector->getBase();
+ $this->is_modified = TRUE;
+ }
+ }
+ }
+ }
+
+
+ /* Save modification back to the LDAP
+ * */
+ function save() {
+
+ plugin::save();
+
+ $this->attrs['memberNisNetgroup'] = array();
+ $this->attrs['nisNetgroupTriple'] = array();
+ foreach($this->triples as $key => $data){
+ $host = $data['host'];
+ $user = $data['user'];
+ $nis_domain = $data['nis_domain'];
+ $domain = $data['domain'];
+ $fqdn = $data['fqdn'];
+ if($host){
+ $this->attrs['nisNetgroupTriple'][] = "({$host},{$user},{$nis_domain})";
+ $this->attrs['nisNetgroupTriple'][] = "({$fqdn},{$user},{$nis_domain})";
+ }else{
+ $this->attrs['nisNetgroupTriple'][] = "({$host},{$user},{$nis_domain})";
+ }
+ }
+
+ if (count($this->netgroups)) {
+ $this->attrs['memberNisNetgroup'] = array_values(array_unique($this->netgroups));
+ }
+
+ /* New accounts need proper 'dn', propagate it to remaining objects */
+ if ($this->dn == 'new') {
+ $this->dn = 'cn='.$this->cn.','.get_ou("netgroupSystem", "netgroupSystemRDN").$this->base;
+ }
+
+ /* 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));
+ }
+
+ /* Write back to ldap */
+ $ldap->cd($this->dn);
+ $this->cleanup();
+ $ldap->$mode($this->attrs);
+
+ // Update ACL dependencies
+ 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 ($this->initially_was_account) {
+ new log("modify", "netgroups/" . get_class($this), $this->dn, array_keys($this->attrs), $ldap->get_error());
+ } else {
+ new log("create", "netgroups/" . get_class($this), $this->dn, array_keys($this->attrs), $ldap->get_error());
+ }
+
+ // Check ldap result
+ $ret = 0;
+ if (!$ldap->success()) {
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ $ret = 1;
+ }
+
+ // Handle post events
+ $this->handle_post_events($mode);
+
+ return ($ret);
+ }
+
+
+ /* Check input values
+ * */
+ function check() {
+
+ $message = plugin::check();
+ if ($this->base != "") {
+ $new_dn = 'cn='.$this->cn.','.get_ou("netgroupSystem", "netgroupSystemRDN").$this->base;
+ } else {
+ $new_dn = $this->dn;
+ }
+
+ if ($this->cn == "" && $this->acl_is_writeable("cn")) {
+ $message[] = msgPool::required(_("Name"));
+ }
+
+ if (!$this->baseSelector->checkLastBaseUpdate()) {
+ $message[] = msgPool::check_base();
+ }
+
+ // Check for valid group name
+ if (!tests::is_uid($this->cn)) {
+ if (strict_uid_mode ()) {
+ $message[] = msgPool::invalid(_("Name"), $this->cn, "/[a-z0-9_-]/");
+ } else {
+ $message[] = msgPool::invalid(_("Name"), $this->cn, "/[a-z0-9_-]/i");
+ }
+ }
+
+ // Check if a wrong base was supplied
+ if (!$this->baseSelector->checkLastBaseUpdate()) {
+ $message[] = msgPool::check_base();
+ }
+
+ // Check netgroup loops and if user is in any netgroup
+ $nisnetmap = array();
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(objectClass=nisNetgroup)", array("cn", "memberNisNetgroup", "nisNetgroupTriple"));
+ while ($attrs = $ldap->fetch()) {
+ $nisnetmap[$attrs['cn'][0]] = array();
+ $nisnetmap[$attrs['cn'][0]]['memberNisNetgroup'] = array();
+ $nisnetmap[$attrs['cn'][0]]['nisNetgroupTriple'] = array();
+ if(isset($attrs['memberNisNetgroup'])){
+ foreach ($attrs['memberNisNetgroup'] as $val) {
+ $nisnetmap[$attrs['cn'][0]]['memberNisNetgroup'][] = $val;
+ }
+ }
+ if(isset($attrs['nisNetgroupTriple'])){
+ foreach ($attrs['nisNetgroupTriple'] as $val) {
+ $nisnetmap[$attrs['cn'][0]]['nisNetgroupTriple'][] = $val;
+ }
+ }
+ }
+
+ $checkmsg = $this->checkNisNetgroup($nisnetmap);
+ if (count($checkmsg) != 0)
+ $message[] = $checkmsg[0];
+
+
+ // Check if we are allowed to create or move this object
+ if (!$this->orig_dn == "new" ||
+ $this->orig_base != $this->base ||
+ $this->cn != $this->orig_cn) {
+
+ 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)) {
+ $message[] = msgPool::permMove();
+ }
+ }
+ return ($message);
+ }
+
+ /* Check for loops in nis-group assignment
+ * */
+ function checkNisNetgroup($nisnetmap, $timeline=FALSE, $checknng=FALSE)
+ {
+ if ($timeline == FALSE) {
+ $timeline = array();
+ foreach ($this->netgroups as $key => $value) {
+ $timeline[] = $key;
+ if(isset($nisnetmap[$key])){
+ foreach ($nisnetmap[$key]['memberNisNetgroup'] as $val) {
+ if(isset($nisnetmap[$val])){
+ $result = $this->checkNisNetgroup($nisnetmap, $timeline, $nisnetmap[$val]);
+ if (count($result) != 0) {
+ return($result);
+ }
+ }
+ }
+ }
+ }
+ } else {
+ foreach ($nisnetmap[$val]['memberNisNetgroup'] as $key) {
+ if (array_search($key, $timeline) !== FALSE) {
+ $result = array();
+ $result[] = _("NIS Netgroup Error") . "<b>" . _("Error: There are a loop with NIS Netgroups") . " [" . " " . $key .
+ "] " . "<br>" .
+ _("IMPORTANT: Check the members of NIS Netgroup") . "</b>";
+ return($result);
+ }
+ $timeline[] = $key;
+ $result = $this->checkNisNetgroup($nisnetmap, $timeline, $nisnetmap[$val]);
+ if (count($result) != 0) {
+ return($result);
+ }
+ }
+ }
+ return(array());
+ }
+
+//TODO: check
+ function getCopyDialog() {
+ $ret = array();
+ return($ret);
+ }
+
+//TODO: check
+ function saveCopyDialog() {
+ if (isset($_POST['cn'])) {
+ $this->cn = $_POST['cn'];
+ }
+ }
+
+ //TODO: check ACL!
+ /* Return plugin informations for acl handling */
+ static function plInfo() {
+ return (array(
+ "plShortName" => _("Generic"),
+ "plDescription" => _("Generic NIS Netgroup settings"),
+ "plSelfModify" => FALSE,
+ "plDepends" => array(),
+ "plPriority" => 0,
+ "plSection" => array("administration"),
+ "plCategory" => array("netgroups" => array("objectClass" => "nisNetgroup", "description" => _("NIS Netgroups"))),
+ "plProvidedAcls" => array(
+ "cn" => _("Name"),
+ "description" => _("Description"),
+ "base" => _("Base"),
+ "memberCn" => _("NIS Netgroup members"))
+ ));
+ }
+
+
+ /* Act on HTML-post when in multiple-edit mode.
+ * */
+ function multiple_save_object()
+ {
+
+ if (isset($_POST['nisnetgroup_mulitple_edit'])) {
+
+ $this->memberList->save_object();
+ $action = $this->memberList->getAction();
+ if(isset($action['action']) && $action['action'] == 'delete'){
+ foreach($action['targets'] as $id){
+ $entry = $this->memberList->getKey($id);
+ if(preg_match("/^t_/", $entry)){
+ $this->removeTriple(preg_replace("/^t_/","",$entry));
+ }else{
+ $this->removeNisGroup(preg_replace("/^g_/","",$entry));
+ }
+ }
+ }
+
+ /* Create a base backup and reset the
+ base directly after calling plugin::save_object();
+ Base will be set seperatly a few lines below */
+ $base_tmp = $this->base;
+ plugin::multiple_save_object();
+ plugin::save_object();
+ $this->base = $base_tmp;
+
+ foreach (array("base") as $attr) {
+ if (isset($_POST['use_' . $attr])) {
+ $this->multi_boxes[] = $attr;
+ }
+ }
+
+ /* Refresh base */
+ if ($this->acl_is_moveable($this->base)) {
+ if (!$this->baseSelector->update()) {
+ msg_dialog::display(_("Error"), msgPool::permMove(), ERROR_DIALOG);
+ }
+ if ($this->base != $this->baseSelector->getBase()) {
+ $this->base = $this->baseSelector->getBase();
+ $this->is_modified = TRUE;
+ }
+ }
+ }
+ }
+
+
+ /* Returns the modified values after a multiple-edit session
+ * */
+ function get_multi_edit_values()
+ {
+ $ret = plugin::get_multi_edit_values();
+ foreach (array("base") as $attr) {
+ if (in_array($attr, $this->multi_boxes)) {
+ $ret[$attr] = $this->$attr;
+ }
+ }
+ $ret['triples'] = $this->triples;
+ $ret['triples_used_by_some'] = $this->triples_used_by_some;
+ $ret['netgroups'] = $this->netgroups;
+ $ret['netgroups_used_by_some'] = $this->netgroups_used_by_some;
+ return($ret);
+ }
+
+
+ function multiple_execute() {
+ return($this->execute());
+ }
+
+
+ /* Load values for multiple-edit
+ * */
+ function init_multiple_support($attrs, $all) {
+ plugin::init_multiple_support($attrs, $all);
+ $this->members=array();
+ $this->allusers=array();
+ $this->users_used_by_some=array();
+ $this->netgroups = array();
+ $this->netgroups_used_by_some = array();
+
+ // Load nis-groups used by some groups
+ if (isset($all['memberNisNetgroup'][0])) {
+ for ($i = 0; $i < $all['memberNisNetgroup']['count']; $i++) {
+ $this->addNisGroup($all['memberNisNetgroup'][$i]);
+ }
+ }
+ $this->netgroups_used_by_some = $this->netgroups;
+
+ // Load nis-groups by all edited-groups
+ $this->netgroups = array();
+ if (isset($attrs['memberNisNetgroup'][0])) {
+ for ($i = 0; $i < $attrs['memberNisNetgroup']['count']; $i++) {
+ $this->addNisGroup($attrs['memberNisNetgroup'][$i]);
+ }
+ }
+
+ $this->triples = array();
+ $this->triples_used_by_some = array();
+
+ if (isset($all['nisNetgroupTriple'])) {
+ $tmp = array();
+ for ($i = 0; $i < $all['nisNetgroupTriple']['count']; $i++) {
+ if (preg_match("/^\((\S+),\-?,(\S*)\)$/", $all['nisNetgroupTriple'][$i], $matches)) {
+
+ // Skip non-fqdn entries
+ if(strpos($matches[1], ".") !== FALSE){
+ $this->addTriple($matches[1], NULL, $matches[2]);
+ }
+ }
+ if (preg_match("/^\(\-?,(\S+),(\S*)\)$/", $all['nisNetgroupTriple'][$i], $matches)) {
+ $this->addTriple(NULL, $matches[1], $matches[2]);
+ }
+ }
+ }
+ $this->triples_used_by_some = $this->triples;
+ $this->triples = array();
+
+ if (isset($attrs['nisNetgroupTriple'])) {
+ $tmp = array();
+ for ($i = 0; $i < $attrs['nisNetgroupTriple']['count']; $i++) {
+ if (preg_match("/^\((\S+),\-?,(\S*)\)$/", $attrs['nisNetgroupTriple'][$i], $matches)) {
+
+ // Skip non-fqdn entries
+ if(strpos($matches[1], ".") !== FALSE){
+ $this->addTriple($matches[1], NULL, $matches[2]);
+ }
+ }
+ if (preg_match("/^\(\-?,(\S+),(\S*)\)$/", $attrs['nisNetgroupTriple'][$i], $matches)) {
+ $this->addTriple(NULL, $matches[1], $matches[2]);
+ }
+ }
+ }
+ }
+
+
+ /* Initialize plugin for multiple edit mode
+ * */
+ function set_multi_edit_values($attrs)
+ {
+ $triples = array();
+ $netgroups = array();
+
+ // Update netgroupMembership, keep optinal netgroup
+ foreach ($attrs['triples_used_by_some'] as $uid => $value) {
+ if (in_array($uid, array_keys($this->triples))) {
+ $triples[$uid] = $value;
+ }
+ }
+ foreach ($attrs['netgroups_used_by_some'] as $uid => $value) {
+ if (in_array($uid, array_keys($this->netgroups))) {
+ $netgroups[$uid] = $value;
+ }
+ }
+
+ // Update netgroupMembership, add forced netgroups
+ foreach ($attrs['triples'] as $uid => $value) {
+ $triples[$uid] = $value;
+ }
+ foreach ($attrs['netgroups'] as $uid => $value) {
+ $netgroups[$uid] = $value;
+ }
+ plugin::set_multi_edit_values($attrs);
+ $this->triples = $triples;
+ $this->netgroups = $netgroups;
+ }
+}
+?>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/class_netgroupManagement.inc
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/class_netgroupManagement.inc (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/class_netgroupManagement.inc 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,95 @@
+<?php
+
+
+/* This code is part of GOsa-contrib (https://oss.gonicus.de/labs/gosa-contrib)
+ * Copyright (C) 2011 Alejandro Escanero Blanco (aescanero at gmail.com)
+ *
+ * Ported to GOsa 2.7 by Fabian Hickert (hickert at gonicus.de)
+ * Copyright (C) 2012 GONICUS GmbH
+ *
+ * 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 netgroupManagement extends management {
+
+ var $plHeadline = "NIS Netgroups";
+ var $plDescription = "NIS Netgroups management";
+ var $plIcon = "plugins/netgroups/images/plugin.png";
+ // Tab definition
+ protected $tabClass = "netgrouptabs";
+ protected $tabType = "NETGROUPTABS";
+ protected $aclCategory = "netgroups";
+ protected $aclPlugin = "netgroup";
+ protected $objectName = "netgroup";
+
+ function __construct($config, $ui) {
+ $this->config = $config;
+ $this->ui = $ui;
+
+ $this->storagePoints = array(get_ou("netgroupSystem", "netgroupSystemRDN"));
+
+ // Build filter
+ if (session::global_is_set(get_class($this) . "_filter")) {
+ $filter = session::global_get(get_class($this) . "_filter");
+ } else {
+ $filter = new filter(get_template_path("netgroup-filter.xml", true));
+ $filter->setObjectStorage($this->storagePoints);
+ }
+ $this->setFilter($filter);
+
+ // Build headpage
+ $headpage = new listing(get_template_path("netgroup-list.xml", true));
+ $headpage->setFilter($filter);
+
+ // Add copy&paste and snapshot handler.
+ if ($this->config->boolValueIsTrue("core", "copyPaste")){
+ //$this->cpHandler = new CopyPasteHandler($this->config);
+ }
+ if($this->config->get_cfg_value("core","enableSnapshots") == "true"){
+ //$this->snapHandler = new SnapshotHandler($this->config);
+ }
+ parent::__construct($config, $ui, "netgroups", $headpage);
+
+ $this->registerAction("edit_netgroup", "editEntry");
+ }
+
+ // Inject user actions
+ function detectPostActions() {
+ $action = management::detectPostActions();
+ if (isset($_POST['save_event_dialog']))
+ $action['action'] = "saveEventDialog";
+ if (isset($_POST['abort_event_dialog']))
+ $action['action'] = "abortEventDialog";
+ return($action);
+ }
+
+ function editEntry($action="", $target=array(), $all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="") {
+ $str = management::editEntry($action, $target);
+
+ if (preg_match("/^edit_/", $action)) {
+ $tab = preg_replace("/^edit_/", "", $action);
+ if (isset($this->tabObject->by_object[$tab])) {
+ $this->tabObject->current = $tab;
+ } else {
+ trigger_error("Unknown tab: " . $tab);
+ }
+ }
+ if (!empty($str))
+ return($str);
+ }
+
+}
+
+?>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/generic.tpl
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/generic.tpl (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/generic.tpl 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,78 @@
+{if $multiple_support}
+ <input type="hidden" value="1" name="nisnetgroup_mulitple_edit">
+{/if}
+
+
+<table summary="" style="width:100%;">
+ <tr>
+ <td style="width:50%; vertical-align:top;">
+ <table summary="" style="width:100%">
+ <tr>
+ <td><LABEL for="cn">{t}NIS Netgroup name{/t}</LABEL>{$must}</td>
+ <td>
+ {if $multiple_support}
+ <input type='text' id="dummy1" name="dummy1" value="{t}Multiple edit{/t}" disabled>
+ {else}
+ {render acl=$cnACL}
+ <input type='text' id="cn" name="cn"
+ value="{$cn}" title="{t}Name of the NIS Netgroup{/t}">
+ {/render}
+ {/if}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <LABEL for="description">{t}Description{/t}</LABEL>
+ </td>
+ <td>
+ {render acl=$descriptionACL checkbox=$multiple_support checked=$use_description}
+ <input type='text' id="description" name="description"
+ value="{$description}" title="{t}Descriptive text for this NIS Netgroup{/t}">
+ {/render}
+ </td>
+ </tr>
+ {if !$multiple_support}
+ <tr>
+ <td>
+ <LABEL for="base">{t}Base{/t}</LABEL>{$must}
+ </td>
+ <td>
+ {render acl=$baseACL checkbox=$multiple_support checked=$use_base}
+ {$base}
+ {/render}
+ </td>
+ </tr>
+ {/if}
+ </table>
+
+ </td>
+ <td class='left-border'>
+ </td>
+
+ <td style="vertical-align:top;">
+ <table summary="" style="width:100%">
+ <tr>
+ <td style="vertical-align:top; width:50%">
+ <b>
+ <LABEL for="members">{t}NIS Netgroup members{/t}</LABEL></b>
+ <br>
+ {$memberList}
+ <br>
+ {render acl=$memberCnACL}
+ <input type=submit name="edit_membership" value="{msgPool type=addButton}">
+ {/render}
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+<input type="hidden" name="nisnetgroupedit" value="1">
+
+<!-- Place cursor -->
+<script language="JavaScript" type="text/javascript">
+ <!-- // First input field on page
+ focus_field('cn');
+ -->
+</script>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/main.inc
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/main.inc (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/main.inc 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,56 @@
+<?php
+
+/* This code is part of GOsa-contrib (https://oss.gonicus.de/labs/gosa-contrib)
+ * Copyright (C) 2011 Alejandro Escanero Blanco (aescanero at gmail.com)
+ *
+ * Ported to GOsa 2.7 by Fabian Hickert (hickert at gonicus.de)
+ * Copyright (C) 2012 GONICUS GmbH
+ *
+ * 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('netgroupManagement')) {
+ $macl = session::get('netgroupManagement');
+ $macl->remove_lock();
+ }
+}
+
+/* Remove this plugin from session
+ */
+if ($cleanup) {
+ session::un_set('netgroupManagement');
+} else {
+
+ /* Create netgroupmanagement object on demand */
+ if (!session::is_set('netgroupManagement')) {
+ $netgroupManagement = new netgroupManagement($config, $ui);
+ session::set('netgroupManagement', $netgroupManagement);
+ }
+ $netgroupManagement = session::get('netgroupManagement');
+ $display = $netgroupManagement->execute();
+
+ /* Reset requested? */
+ if (isset($_GET['reset']) && $_GET['reset'] == 1) {
+ session::un_set('netgroupManagement');
+ }
+
+ /* Show and save dialog */
+ session::set('netgroupManagement', $netgroupManagement);
+}
+?>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/class_memberNisnetgroupSelect.inc
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/class_memberNisnetgroupSelect.inc (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/class_memberNisnetgroupSelect.inc 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,49 @@
+<?php
+
+/* This code is part of GOsa-contrib (https://oss.gonicus.de/labs/gosa-contrib)
+ * Copyright (C) 2011 Alejandro Escanero Blanco (aescanero at gmail.com)
+ *
+ * Ported to GOsa 2.7 by Fabian Hickert (hickert at gonicus.de)
+ * Copyright (C) 2012 GONICUS GmbH
+ *
+ * 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 memberNisnetgroupSelect extends management {
+
+ protected $skipFooter = TRUE;
+ protected $skipHeader = TRUE;
+ private $myFilter;
+ private $myHeadpage;
+
+ function __construct($config, $ui) {
+ $this->config = $config;
+ $this->ui = $ui;
+
+ $this->storagePoints = array(get_ou("netgroupSystem", "netgroupSystemRDN"));
+
+ $myFilter = new filter(get_template_path("memberNisnetgroup-filter.xml", true, dirname(__FILE__)));
+ $myFilter->setObjectStorage($this->storagePoints);
+ $this->setFilter($myFilter);
+
+ // Build headpage
+ $myHeadpage = new listing(get_template_path("memberNisnetgroup-list.xml", true, dirname(__FILE__)));
+ $myHeadpage->setFilter($myFilter);
+ parent::__construct($config, $ui, "memberNisnetgroup", $myHeadpage);
+ }
+
+}
+
+?>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-filter.xml
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-filter.xml (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-filter.xml 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<filterdef>
+ <definition>
+ <category>memberNisnetgroups</category>
+ <template>../plugins/admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-filter.tpl</template>
+ <initial>true</initial>
+ <default>default</default>
+ <attribute>dn</attribute>
+ <attribute>objectClass</attribute>
+ <attribute>cn</attribute>
+ <attribute>uid</attribute>
+ <attribute>description</attribute>
+ <scope>auto</scope>
+ </definition>
+
+
+ <search>
+ <tag>default</tag>
+ <label>Default filter</label>
+ <query>
+ <backend>LDAP</backend>
+ <filter>(&(objectClass=nisNetgroup)(cn=$))</filter>
+ </query>
+ </search>
+
+</filterdef>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.tpl
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.tpl (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.tpl 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,28 @@
+<div id="mainlist">
+
+ <div class="mainlist-header">
+ <p>{$HEADLINE} {$SIZELIMIT}</p>
+ <div class="mainlist-nav">
+ <table summary="{$HEADLINE}">
+ <tr>
+ <td>{$ROOT}</td>
+ <td>{$BACK}</td>
+ <td>{$HOME}</td>
+ <td>{$RELOAD}</td>
+ <td class="left-border">{t}Base{/t} {$BASE}</td>
+ <td class="left-border">{$ACTIONS}</td>
+ <td class="left-border">{$FILTER}</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ {$LIST}
+</div>
+
+<div class="clear"></div>
+
+<div class="plugin-actions">
+ <button type=submit name="add_memberNisnetgroups_finish">{msgPool type=addButton}</button>
+ <button type=submit name="add_memberNisnetgroups_cancel">{msgPool type=cancelButton}</button>
+</div>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<list>
+ <definition>
+ <departmentBrowser>true</departmentBrowser>
+ <departmentRootVisible>false</departmentRootVisible>
+ <baseMode>true</baseMode>
+ <multiSelect>true</multiSelect>
+ <template>../plugins/admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.tpl</template>
+ <label>Please select the desired NIS Netgroups</label>
+ <defaultSortColumn>1</defaultSortColumn>
+
+ <objectType>
+ <label>NIS Netgroup</label>
+ <objectClass>nisNetgroup</objectClass>
+ <category>memberNisnetgroups</category>
+ <class>netgroup</class>
+ <image>plugins/netgroups/images/select_netgroup.png</image>
+ </objectType>
+
+ </definition>
+
+ <table>
+ <layout>|20px;c|||</layout>
+
+ <department>
+ <value>%{filter:objectType(dn,objectClass)}</value>
+ </department>
+
+ <department>
+ <value>%{filter:departmentLink(row,dn,description)}</value>
+ <span>1</span>
+ </department>
+
+ <column>
+ <value>%{filter:objectType(dn,objectClass)}</value>
+ </column>
+
+ <column>
+ <label>Common name</label>
+ <sortAttribute>cn</sortAttribute>
+ <sortType>string</sortType>
+ <value>%{cn}</value>
+ <export>true</export>
+ </column>
+
+ <column>
+ <label>Description</label>
+ <sortAttribute>description</sortAttribute>
+ <sortType>string</sortType>
+ <value>%{description}</value>
+ <export>true</export>
+ </column>
+ </table>
+</list>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/netgroup-filter.xml
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/netgroup-filter.xml (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/netgroup-filter.xml 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<filterdef>
+ <definition>
+ <category>netgroups</category>
+ <template>netgroup-filter.tpl</template>
+ <initial>true</initial>
+ <default>default</default>
+ <scope>auto</scope>
+ <attribute>dn</attribute>
+ <attribute>objectClass</attribute>
+ <attribute>cn</attribute>
+ <attribute>description</attribute>
+ </definition>
+
+ <search>
+ <tag>default</tag>
+ <label>Default filter</label>
+ <query>
+ <backend>LDAP</backend>
+ <filter>(&(objectClass=nisNetgroup)(cn=$))</filter>
+ </query>
+ </search>
+</filterdef>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/netgroup-list.tpl
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/netgroup-list.tpl (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/netgroup-list.tpl 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,26 @@
+<div id="mainlist">
+
+ <div class="mainlist-header">
+ <p>{$HEADLINE} {$SIZELIMIT}</p>
+ <div class="mainlist-nav">
+ <table summary="{$HEADLINE}">
+ <tr>
+ <td>{$ROOT}</td>
+ <td>{$BACK}</td>
+ <td>{$HOME}</td>
+ <td>{$RELOAD}</td>
+ <td class="left-border">{t}Base{/t} {$BASE}</td>
+ <td class="left-border">{$ACTIONS}</td>
+ <td class="left-border">{$FILTER}</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ {$LIST}
+</div>
+
+<div class="clear"></div>
+
+<input type="hidden" name="ignore">
+
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/netgroup-list.xml
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/netgroup-list.xml (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/netgroup-list.xml 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<list>
+ <definition>
+ <departmentBrowser>true</departmentBrowser>
+ <departmentRootVisible>false</departmentRootVisible>
+ <baseMode>true</baseMode>
+ <multiSelect>true</multiSelect>
+ <template>netgroup-list.tpl</template>
+ <module>netgroups</module>
+ <label>List of NIS Netgroups</label>
+ <defaultSortColumn>1</defaultSortColumn>
+
+ <objectType>
+ <label>NIS Netgroup</label>
+ <objectClass>nisNetgroup</objectClass>
+ <category>netgroups</category>
+ <class>netgroup</class>
+ <image>plugins/netgroups/images/select_netgroup.png</image>
+ </objectType>
+
+ </definition>
+
+ <table>
+ <layout>|20px;c|||120px|150px;r|</layout>
+
+ <department>
+ <value>%{filter:objectType(dn,objectClass)}</value>
+ </department>
+
+ <department>
+ <value>%{filter:departmentLink(row,dn,description)}</value>
+ <span>2</span>
+ </department>
+
+ <column>
+ <value>%{filter:objectType(dn,objectClass)}</value>
+ </column>
+
+ <column>
+ <label>Name</label>
+ <sortAttribute>cn</sortAttribute>
+ <sortType>string</sortType>
+ <value>%{filter:link(row,dn,"%s",cn)}</value>
+ <export>true</export>
+ </column>
+
+ <column>
+ <label>Description</label>
+ <sortAttribute>description</sortAttribute>
+ <sortType>string</sortType>
+ <value>%{filter:link(row,dn,"%s",description)}</value>
+ <export>true</export>
+ </column>
+
+ <column>
+ <label>Properties</label>
+ <value>%{filter:filterProperties(row,objectClass)}</value>
+ </column>
+
+ <column>
+ <label>Actions</label>
+ <value>%{filter:actions(dn,row,objectClass)}</value>
+ </column>
+
+ </table>
+
+ <actionmenu>
+
+ <action>
+ <type>sub</type>
+ <image>images/lists/new.png</image>
+ <label>Create</label>
+
+ <action>
+ <name>new</name>
+ <type>entry</type>
+ <image>plugins/netgroups/images/new.png</image>
+ <label>NIS Netgroup</label>
+ </action>
+ </action>
+
+ <action>
+ <type>separator</type>
+ </action>
+
+ <action>
+ <name>edit</name>
+ <type>entry</type>
+ <image>images/lists/edit.png</image>
+ <label>Edit</label>
+ </action>
+
+ <action>
+ <name>remove</name>
+ <type>entry</type>
+ <image>images/lists/trash.png</image>
+ <label>Remove</label>
+ </action>
+
+ <action>
+ <type>exporter</type>
+ </action>
+
+ <action>
+ <type>separator</type>
+ </action>
+
+ <action>
+ <type>copypaste</type>
+ </action>
+
+ <action>
+ <type>snapshot</type>
+ </action>
+
+ </actionmenu>
+
+ <actiontriggers snapshot="true" copypaste="true">
+
+ <action>
+ <name>cp</name>
+ <type>copypaste</type>
+ </action>
+
+ <action>
+ <name>edit</name>
+ <type>entry</type>
+ <image>images/lists/edit.png</image>
+ <label>Edit NIS Netgroup</label>
+ </action>
+
+ <action>
+ <name>snapshot</name>
+ <type>snapshot</type>
+ </action>
+
+ <action>
+ <name>remove</name>
+ <type>entry</type>
+ <image>images/lists/trash.png</image>
+ <acl>netgroups/netgroup[d]</acl>
+ <label>Remove NIS Netgroup</label>
+ </action>
+
+ </actiontriggers>
+
+</list>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tabs_netgroup.inc
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tabs_netgroup.inc (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tabs_netgroup.inc 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,95 @@
+<?php
+
+/* This code is part of GOsa-contrib (https://oss.gonicus.de/labs/gosa-contrib)
+ * Copyright (C) 2011 Alejandro Escanero Blanco (aescanero at gmail.com)
+ *
+ * Ported to GOsa 2.7 by Fabian Hickert (hickert at gonicus.de)
+ * Copyright (C) 2012 GONICUS GmbH
+ *
+ * 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 netgrouptabs extends tabs {
+
+ function netgrouptabs($config, $data, $dn, $cat = "", $hide_refs = FALSE, $hide_acls = FALSE) {
+ tabs::tabs($config, $data, $dn, "netgroups", $hide_refs, $hide_acls);
+ $this->addSpecialTabs();
+ }
+
+ function save_object($save_current= FALSE) {
+ tabs::save_object($save_current);
+
+ /* Update reference, transfer variables */
+ $baseobject = $this->by_object['netgroup'];
+ foreach ($this->by_object as $name => $obj) {
+ /* Don't touch base object */
+ if ($name != 'netgroup') {
+ $obj->parent = &$this;
+ $obj->cn = $baseobject->cn;
+ $this->by_object[$name] = $obj;
+ }
+ }
+ }
+
+ function delete() {
+ /* Put baseobjects 'cn' to mailobjects 'uid' */
+ $baseobject = $this->by_object['netgroup'];
+ tabs::delete();
+ }
+
+ function save($ignore_account= FALSE) {
+ $baseobject = $this->by_object['netgroup'];
+
+ /* Check for new 'dn', in order to propagate the
+ 'dn' to all plugins */
+ $new_dn = 'cn=' . $baseobject->cn . ',' . get_ou("netgroupSystem", "netgroupSystemRDN") . $baseobject->base;
+
+ /* Move netgroup? */
+ if ($this->dn != $new_dn) {
+
+ /* Write entry on new 'dn' */
+ if ($this->dn != "new") {
+ $baseobject->update_acls($this->dn, $new_dn);
+ $baseobject->move($this->dn, $new_dn);
+ $this->by_object['netgroup'] = $baseobject;
+ }
+
+ /* Happen to use the new one */
+ $this->dn = $new_dn;
+ }
+
+ $ret = tabs::save();
+
+ return $ret;
+ }
+
+ function saveCopyDialog() {
+ tabs::saveCopyDialog();
+
+ /* Update reference, transfer variables */
+ $baseobject = $this->by_object['netgroup'];
+ foreach ($this->by_object as $name => $obj) {
+ /* Don't touch base object */
+ if ($name != 'netgroup') {
+ $obj->parent = &$this;
+ $obj->cn = $baseobject->cn;
+ $this->by_object[$name] = $obj;
+ }
+ }
+ }
+
+}
+
+?>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/class_filterTriplesLDAP.inc
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/class_filterTriplesLDAP.inc (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/class_filterTriplesLDAP.inc 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,65 @@
+<?php
+
+/* This code is part of GOsa-contrib (https://oss.gonicus.de/labs/gosa-contrib)
+ * Copyright (C) 2011 Alejandro Escanero Blanco (aescanero at gmail.com)
+ *
+ * Ported to GOsa 2.7 by Fabian Hickert (hickert at gonicus.de)
+ * Copyright (C) 2012 GONICUS GmbH
+ *
+ * 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 filterTriplesLDAP extends filterLDAPBlacklist{
+
+ static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
+ {
+ $result = filterLDAP::query($base, $scope, $filter, $attributes, $category, $objectStorage);
+ $filtered = filterLDAPBlacklist::filterByBlacklist($result);
+ $filtered = filterTriplesLDAP::onlyHostsWithFQDN($filtered);
+ return($filtered);
+ }
+
+ static function onlyHostsWithFQDN($entries)
+ {
+ global $config;
+ $new_list = array();
+ foreach($entries as $entry){
+ if(array_intersect(array("goServer", "gotoTerminal", "gotoWorkstation"), $entry['objectClass'])){
+ if(strpos($entry['cn'][0], ".") !== FALSE){
+ $new_list[] = $entry;
+ }else{
+
+ // No FQDN given for this host, now try to find dns-domain information for this host and
+ // append the dns-domain to the hostname.
+ $ldap = $config->get_ldap_link();
+ $ldap->cd($config->current['BASE']);
+ $ldap->search("(&(objectClass=dNSZone)(relativeDomainName=".$entry['cn'][0].")(aRecord=*))", array("zoneName"));
+ while ($attrs = $ldap->fetch()) {
+ $entry['cn'][0] = $entry['cn'][0].".".$attrs['zoneName'][0];
+ $new_list[] = $entry;
+ }
+
+ }
+ }else{
+ $new_list[] = $entry;
+ }
+
+ }
+ return($new_list);
+ }
+
+}
+
+?>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/class_tripleSelect.inc
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/class_tripleSelect.inc (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/class_tripleSelect.inc 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,51 @@
+<?php
+
+/* This code is part of GOsa-contrib (https://oss.gonicus.de/labs/gosa-contrib)
+ * Copyright (C) 2011 Alejandro Escanero Blanco (aescanero at gmail.com)
+ *
+ * Ported to GOsa 2.7 by Fabian Hickert (hickert at gonicus.de)
+ * Copyright (C) 2012 GONICUS GmbH
+ *
+ * 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 tripleSelect extends management {
+
+ protected $skipFooter = TRUE;
+ protected $skipHeader = TRUE;
+
+ function __construct($config, $ui, $excludeDN) {
+
+ $this->config = $config;
+ $this->ui = $ui;
+ $this->storagePoints = array_unique(array(
+ get_ou("core", "userRDN"),
+ get_ou("netgroupSystem", "netgroupSystemRDN"),
+ get_ou("servgeneric", "serverRDN"),
+ get_ou("workgeneric", "workstationRDN"),
+ get_ou("termgeneric", "terminalRDN"),
+ get_ou("componentGeneric", "componentRDN")));
+
+ $myFilter = new filter(get_template_path("triple-filter.xml", true, dirname(__FILE__)));
+ $myFilter->setObjectStorage($this->storagePoints);
+ $this->setFilter($myFilter);
+
+ // Build headpage
+ $myHeadpage = new listing(get_template_path("triple-list.xml", true, dirname(__FILE__)));
+ $myHeadpage->setFilter($myFilter);
+ parent::__construct($config, $ui, "triples", $myHeadpage);
+ }
+}
+?>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/triple-filter.xml
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/triple-filter.xml (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/triple-filter.xml 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<filterdef>
+ <definition>
+ <category>netgroups</category>
+ <template>../plugins/admin/netgroups/tripleSelect/triple-filter.tpl</template>
+ <initial>true</initial>
+ <attribute>dn</attribute>
+ <attribute>objectClass</attribute>
+ <attribute>cn</attribute>
+ <attribute>uid</attribute>
+ <attribute>description</attribute>
+ <scope>auto</scope>
+ <default>default</default>
+ </definition>
+ <search>
+ <tag>default</tag>
+ <label>Default</label>
+ <query>
+ <backend>TriplesLDAP</backend>
+ <filter>
+ (&
+ (|
+ (objectClass=nisNetgroup)
+ (objectClass=ieee802Device)
+ (objectClass=goServer)
+ (objectClass=gotoWorkstation)
+ (objectClass=gotoTerminal)
+ (&(objectClass=posixAccount)(objectClass=gosaAccount)(!(objectClass=gosaUserTemplate)))
+ )
+ (|(cn=$)(uid=$))
+ )
+ </filter>
+ </query>
+ </search>
+</filterdef>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/triple-list.tpl
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/triple-list.tpl (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/triple-list.tpl 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,28 @@
+<div id="mainlist">
+
+ <div class="mainlist-header">
+ <p>{$HEADLINE} {$SIZELIMIT}</p>
+ <div class="mainlist-nav">
+ <table summary="{$HEADLINE}">
+ <tr>
+ <td>{$ROOT}</td>
+ <td>{$BACK}</td>
+ <td>{$HOME}</td>
+ <td>{$RELOAD}</td>
+ <td class="left-border">{t}Base{/t} {$BASE}</td>
+ <td class="left-border">{$ACTIONS}</td>
+ <td class="left-border">{$FILTER}</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ {$LIST}
+</div>
+
+<div class="clear"></div>
+
+<div class="plugin-actions">
+ <button type=submit name="add_triples_finish">{msgPool type=addButton}</button>
+ <button type=submit name="add_triples_cancel">{msgPool type=cancelButton}</button>
+</div>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/triple-list.xml
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/triple-list.xml (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/netgroups/tripleSelect/triple-list.xml 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<list>
+ <definition>
+ <departmentBrowser>true</departmentBrowser>
+ <departmentRootVisible>false</departmentRootVisible>
+ <baseMode>true</baseMode>
+ <multiSelect>true</multiSelect>
+ <template>../plugins/admin/netgroups/tripleSelect/triple-list.tpl</template>
+ <label>Please select the desired entries</label>
+ <defaultSortColumn>1</defaultSortColumn>
+
+ <objectType>
+ <label>NIS Netgroup</label>
+ <objectClass>nisNetgroup</objectClass>
+ <category>netgroups</category>
+ <class>netgroup</class>
+ <image>plugins/netgroups/images/select_netgroup.png</image>
+ </objectType>
+
+ <objectType>
+ <label>User</label>
+ <objectClass>posixAccount</objectClass>
+ <category>triples</category>
+ <class>triple</class>
+ <image>plugins/users/images/select_user.png</image>
+ </objectType>
+
+ <objectType>
+ <label>Server</label>
+ <objectClass>goServer</objectClass>
+ <category>server</category>
+ <class>servgeneric</class>
+ <image>plugins/systems/images/select_server.png</image>
+ </objectType>
+
+ <objectType>
+ <label>Workstation</label>
+ <objectClass>gotoWorkstation</objectClass>
+ <category>workstation</category>
+ <class>workgeneric</class>
+ <image>plugins/systems/images/select_workstation.png</image>
+ </objectType>
+
+ <objectType>
+ <label>Terminal</label>
+ <objectClass>gotoTerminal</objectClass>
+ <category>terminal</category>
+ <class>termgeneric</class>
+ <image>plugins/systems/images/select_terminal.png</image>
+ </objectType>
+
+ <objectType>
+ <label>Component</label>
+ <objectClass>ieee802Device</objectClass>
+ <category>component</category>
+ <class>componentGeneric</class>
+ <image>plugins/systems/images/select_component.png</image>
+ </objectType>
+
+ </definition>
+
+ <table>
+ <layout>|20px;c|||||</layout>
+
+ <department>
+ <value>%{filter:objectType(dn,objectClass)}</value>
+ </department>
+
+ <department>
+ <value>%{filter:departmentLink(row,dn,description)}</value>
+ <span>1</span>
+ </department>
+
+ <column>
+ <value>%{filter:objectType(dn,objectClass)}</value>
+ </column>
+
+ <column>
+ <label>Common name</label>
+ <sortAttribute>cn</sortAttribute>
+ <sortType>string</sortType>
+ <value>%{cn}</value>
+ <export>true</export>
+ </column>
+
+ <column>
+ <label>Login</label>
+ <sortAttribute>uid</sortAttribute>
+ <sortType>string</sortType>
+ <value>%{uid}</value>
+ <export>true</export>
+ </column>
+
+ <column>
+ <label>Surname</label>
+ <sortAttribute>sn</sortAttribute>
+ <sortType>string</sortType>
+ <value>%{sn}</value>
+ <export>true</export>
+ </column>
+
+ <column>
+ <label>Description</label>
+ <sortAttribute>description</sortAttribute>
+ <sortType>string</sortType>
+ <value>%{description}</value>
+ <export>true</export>
+ </column>
+
+ </table>
+
+ <actionmenu>
+ </actionmenu>
+
+ <actiontriggers snapshot="false" copypaste="false">
+ </actiontriggers>
+
+</list>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/systems/netgroups/class_netgroupSystem.inc
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/systems/netgroups/class_netgroupSystem.inc (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/systems/netgroups/class_netgroupSystem.inc 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,317 @@
+<?php
+
+/* This code is part of GOsa-contrib (https://oss.gonicus.de/labs/gosa-contrib)
+ * Copyright (C) 2011 Alejandro Escanero Blanco (aescanero at gmail.com)
+ *
+ * Ported to GOsa 2.7 by Fabian Hickert (hickert at gonicus.de)
+ * Copyright (C) 2012 GONICUS GmbH
+ *
+ * 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 netgroupSystem extends plugin {
+
+ var $plHeadline = "NIS Netgroup";
+ var $plDescription = "Choose NIS Netgroups for the system";
+
+ /* Plugin specific values */
+ var $view_logged = FALSE;
+
+ /* attribute list for save action */
+ var $CopyPasteVars = array();
+ var $objectInfo = array();
+ var $attributes = array();
+ var $objectclasses = array("whatever");
+ var $cn = "";
+ var $netgroups = array();
+ var $initial_netgroups = array();
+ var $netgroupSelect = FALSE;
+ var $multiple_support = TRUE;
+ var $is_account = TRUE;
+ var $dn = "";
+ var $attrs = array();
+ var $fqdn_found = FALSE;
+
+
+ /* Constructor: Prepare values, lists, ...
+ * */
+ function netgroupSystem(&$config, $dn= NULL)
+ {
+ $this->config = $config;
+
+ /* Load bases attributes */
+ plugin::plugin($config, $dn);
+
+ /* Setting cn to default */
+ if (isset($this->attrs['cn'][0])) {
+ $this->cn = $this->attrs['cn'][0];
+ }
+
+ // Extract host and domain name out of the cn
+ $host = $this->cn;
+ $domain = "";
+ $this->fqdn_found = TRUE;
+ if(strpos($host, ".") === FALSE){
+ $domain = $this->getDNSZoneForHost($host);
+ if(!$domain){
+ $this->fqdn_found = FALSE;
+ }
+ }else{
+ $domain = preg_replace("/^[^\.]*+\./", "", $host);
+ $host = preg_replace("/\..*/", "", $host);
+ }
+ $this->host = $host;
+ $this->domain = $domain;
+ $this->fqdn = "{$host}.{$domain}";
+
+ if ($this->fqdn_found && $this->dn != "new") {
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=nisNetgroup)(nisNetgroupTriple=*))", array("cn", "nisNetgroupTriple"));
+ while ($attrs = $ldap->fetch()) {
+ foreach ($attrs['nisNetgroupTriple'] as $val) {
+ if (preg_match("/^\(" . $this->fqdn . ",\-?,(\S*)\)$/", $val, $matches)) {
+ $this->addGroup($attrs['cn'][0]);
+ }
+ }
+ }
+ }
+
+ $this->initial_netgroups = $this->netgroups;
+
+ // Prepare lists
+ $this->memberList = new sortableListing(array(),array(), FALSE);
+ $this->memberList->setDeleteable(true);
+ $this->memberList->setInstantDelete(false);
+ $this->memberList->setEditable(false);
+ $this->memberList->setWidth("100%");
+ $this->memberList->setHeight("300px");
+ $this->memberList->setColspecs(array('20px','*','*'));
+ $this->memberList->setHeader(array("-",_("Name"),_("Description")));
+ $this->memberList->setDefaultSortColumn(1);
+ }
+
+
+ /* Returns the dns-domain name used by the given hostname
+ * If no domainname could be identified, NULL is returned
+ * */
+ function getDNSZoneForHost($host)
+ {
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=dNSZone)(relativeDomainName=".$host.")(aRecord=*))", array("zoneName"));
+ while ($attrs = $ldap->fetch()) {
+ return($attrs['zoneName'][0]);
+ }
+ return(NULL);
+ }
+
+
+ /* Removes a netgroup from this object
+ * */
+ function removeGroup($name)
+ {
+ unset($this->objectInfo[$name]);
+ unset($this->netgroups[$name]);
+ }
+
+
+ /* Adds a netgroup to this object
+ * */
+ function addGroup($name, $attrs=NULL)
+ {
+ if($attrs){
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=nisNetgroup)(cn=".normalizeldap($name)."))", array("cn", "description"));
+ if(!$ldap->count()){
+ return;
+ }
+ $attrs= $ldap->fetch();
+ }
+ $desc = " ";
+ if(isset($attrs['description'])){
+ $desc = $attrs['description'][0];
+ }
+ $this->removeGroup($name);
+ $this->objectInfo[$name] = array(image("plugins/netgroups/images/select_netgroup.png"), $name, $desc);
+ $this->netgroups[$name] = $name;
+ }
+
+
+ /* Render the gui.
+ * */
+ function execute($isCopyPaste = false) {
+ /* Call parent execute */
+ plugin::execute();
+ $display = "";
+
+ // Set list Acls
+ $this->memberList->setAcl($this->getacl("netgroups"));
+
+ /* Log view */
+ if ($this->is_account && !$this->view_logged) {
+ $this->view_logged = TRUE;
+ new log("view", "users/" . get_class($this), $this->dn);
+ }
+
+ if (isset($_POST['del_netgroups']) && isset($_POST['netgroups']) && preg_match("/w/", $this->getacl("netgroups"))) {
+ foreach ($_POST['netgroups'] as $value) {
+ unset($this->netgroups["$value"]);
+ }
+ }
+
+ /* Add objects? */
+ if (isset($_POST["edit_membership"]) && preg_match("/w/", $this->getacl("netgroups"))) {
+ $this->netgroupSelect = new memberNisnetgroupSelect($this->config, get_userinfo());
+ $this->dialog = TRUE;
+ }
+
+ /* Add objects finished? */
+ if (isset($_POST["add_memberNisnetgroups_cancel"])) {
+ $this->netgroupSelect = NULL;
+ $this->dialog = FALSE;
+ }
+
+ /* Add to netgroup */
+ if (isset($_POST['add_memberNisnetgroups_finish']) && $this->netgroupSelect) {
+
+ /* Get all the dn from netgroupSelect */
+ $users = $this->netgroupSelect->detectPostActions();
+ if (isset($users['targets'])) {
+ $headpage = $this->netgroupSelect->getHeadpage();
+ foreach ($users['targets'] as $dn) {
+ $attrs = $headpage->getEntry($dn);
+ $this->addGroup($attrs['cn'][0]);
+ }
+ }
+ $this->netgroupSelect = NULL;
+ $this->dialog = FALSE;
+ }
+
+ /* Manage object add dialog */
+ if ($this->netgroupSelect) {
+ return($this->netgroupSelect->execute());
+ }
+
+ $data = $lData = array();
+ foreach($this->netgroups as $key => $name){
+ $data[$key] = $key;
+ $lData[$key] = array('data'=> $this->objectInfo[$name]);
+ }
+
+ $this->memberList->setListData($data, $lData);
+ $this->memberList->update();
+
+ // Assign smarty variables
+ $smarty = get_smarty();
+ $smarty->assign("fqdn_found", $this->fqdn_found);
+ $smarty->assign("memberList", $this->memberList->render());
+ $smarty->assign("netgroupsACL", $this->getacl("netgroups"));
+ $display.= $smarty->fetch(get_template_path('netgroupSystem.tpl', TRUE, dirname(__FILE__)));
+ return($display);
+ }
+
+
+ /* Take care of HTML POST actions
+ * */
+ function save_object()
+ {
+ if (isset($_POST['nisnetgroupedit'])) {
+ plugin::save_object();
+
+ $this->memberList->save_object();
+ $action = $this->memberList->getAction();
+ if(isset($action['action']) && $action['action'] == 'delete'){
+ foreach($action['targets'] as $id){
+ $this->removeGroup($entry = $this->memberList->getKey($id));
+ }
+ }
+ }
+ }
+
+
+ /* Save changes back to the ldap.
+ * */
+ function save()
+ {
+ // If nothing has changed, just return
+ if(! (array_diff(array_keys($this->initial_netgroups), array_keys($this->netgroups)) ||
+ array_diff(array_keys($this->netgroups), array_keys($this->initial_netgroups)))){
+ return;
+ }
+
+ $to_add = $to_del = array();
+ foreach(array_keys($this->netgroups) as $val){
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=nisNetgroup)(cn=".$val."))", array("dn"));
+ while ($g_data = $ldap->fetch()) {
+ $to_add[] = $g_data['dn'];
+ }
+ }
+ foreach($to_add as $dn){
+ $ng = new netgroup($this->config, $dn);
+ $ng->addTriple($this->cn, NULL, "", $this->attrs);
+ $ng->save();
+ }
+
+ $nonetgroups=array_diff(array_keys($this->initial_netgroups), array_keys($this->netgroups));
+ foreach($nonetgroups as $val){
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=nisNetgroup)(cn=".$val."))", array("dn"));
+ while ($g_data = $ldap->fetch()) {
+ $to_del[] = $g_data['dn'];
+ }
+ }
+ foreach($to_del as $dn){
+ $ng = new netgroup($this->config, $dn);
+ $ng->removeTriple($this->cn);
+ $ng->save();
+ }
+ }
+
+
+ /* Return plugin information
+ * */
+ static function plInfo() {
+ return (array(
+ "plDescription" => _("NIS Netgroup member"),
+ "plSelfModify" => FALSE,
+ "plDepends" => array("user"),
+ "plPriority" => 2,
+ "plSection" => array("personal"),
+ "plCategory" => array("users"),
+ "plProperties" =>
+ array(
+ array(
+ "name" => "netgroupSystemRDN",
+ "type" => "rdn",
+ "default" => "ou=netgroups,",
+ "description" => _("RDN for netgroup storage."),
+ "check" => "gosaProperty::isRdn",
+ "group" => "plugin",
+ "mandatory" => FALSE)),
+
+ "plOptions" => array(),
+ "plProvidedAcls" => array(
+ "netgroups" => _("NIS Netgroup"))
+ ));
+ }
+}
+
+?>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/systems/netgroups/netgroupSystem.tpl
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/systems/netgroups/netgroupSystem.tpl (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/admin/systems/netgroups/netgroupSystem.tpl 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,16 @@
+{if !$fqdn_found}
+ <h2>{t}This host cannot be added to NIS Netgroups{/t}</h2>
+ <p>{t}Only hosts with a fully qualified domain name or those with DNS settings enabled in GOsa can be added to NIS Netgroups!{/t}</p>
+
+{else}
+
+ <b><LABEL for="netgroups">{t}Member of the following NIS Netgroups{/t}</LABEL></b>
+ {render acl=$netgroupsACL}
+ {$memberList}
+ {/render}
+ <br>
+ {render acl=$netgroupsACL}
+ <input type=submit name="edit_membership" value="{msgPool type=addButton}">
+ {/render}
+ <input type="hidden" name="nisnetgroupedit" value="1">
+{/if}
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/html/images/plugin.png
===================================================================
(Binary files differ)
Property changes on: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/html/images/plugin.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/html/images/select_netgroup.png
===================================================================
(Binary files differ)
Property changes on: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/html/images/select_netgroup.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/de/LC_MESSAGES/messages.po
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/de/LC_MESSAGES/messages.po (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/de/LC_MESSAGES/messages.po 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,260 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Marcel Sandow <MarcelSandow at gmx.de>, 2011.
+# Cajus Pollmeier <pollmeier at gonicus.de>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gosa-netgroups-plugin\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-27 16:57+0200\n"
+"PO-Revision-Date: 2011-06-03 23:28+0100\n"
+"Last-Translator: Marcel Sandow <MarcelSandow at gmx.de>\n"
+"Language-Team: German <>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: German\n"
+"X-Poedit-Country: GERMANY\n"
+
+#: personal/netgroups/class_netgroupAccount.inc:28
+#: personal/netgroups/class_netgroupAccount.inc:335
+#: admin/systems/netgroups/class_netgroupSystem.inc:27
+#: admin/systems/netgroups/class_netgroupSystem.inc:312
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:14
+#: admin/netgroups/netgroup-list.xml:15 admin/netgroups/netgroup-list.xml:79
+#: admin/netgroups/tripleSelect/triple-list.xml:14
+msgid "NIS Netgroup"
+msgstr "NIS Netgroup"
+
+#: personal/netgroups/class_netgroupAccount.inc:29
+msgid "Choose NIS Netgroups for the user"
+msgstr "NIS Netgroups für den Benutzer auswählen"
+
+#: personal/netgroups/class_netgroupAccount.inc:89
+#: admin/systems/netgroups/class_netgroupSystem.inc:103
+#: admin/netgroups/netgroup-list.xml:41 admin/netgroups/class_netgroup.inc:120
+#: admin/netgroups/class_netgroup.inc:587
+#: admin/netgroups/class_netgroup.inc:597
+#: admin/netgroups/class_netgroup.inc:599
+#: admin/netgroups/class_netgroup.inc:711
+msgid "Name"
+msgstr "Name"
+
+#: personal/netgroups/class_netgroupAccount.inc:89
+#: admin/systems/netgroups/class_netgroupSystem.inc:103
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:48
+#: admin/netgroups/netgroup-list.xml:49 admin/netgroups/class_netgroup.inc:120
+#: admin/netgroups/class_netgroup.inc:712 admin/netgroups/generic.tpl:25
+#: admin/netgroups/tripleSelect/triple-list.xml:104
+msgid "Description"
+msgstr "Beschreibung"
+
+#: personal/netgroups/class_netgroupAccount.inc:327
+#: admin/systems/netgroups/class_netgroupSystem.inc:293
+msgid "NIS Netgroup member"
+msgstr "NIS Netgroup Mitglied"
+
+#: personal/netgroups/netgroupAccount.tpl:1
+#: admin/systems/netgroups/netgroupSystem.tpl:7
+msgid "Member of the following NIS Netgroups"
+msgstr "Mitglied der folgenden NIS Netgroups"
+
+#: admin/systems/netgroups/netgroupSystem.tpl:2
+msgid "This host cannot be added to NIS Netgroups"
+msgstr "Dieses System kann nicht zu NIS Netgroups hinzugefügt werden"
+
+#: admin/systems/netgroups/netgroupSystem.tpl:3
+msgid ""
+"Only hosts with a fully qualified domain name or those with DNS settings "
+"enabled in GOsa can be added to NIS Netgroups!"
+msgstr ""
+"Nur Systeme mit einem voll qualifizierten Hostnamen oder die über GOsa/DNS "
+"verwaltet werden können zu NIS Netgroups hinzugefügt werden!"
+
+#: admin/systems/netgroups/class_netgroupSystem.inc:28
+msgid "Choose NIS Netgroups for the system"
+msgstr "NIS Netgroups für das System auswählen"
+
+#: admin/systems/netgroups/class_netgroupSystem.inc:305
+msgid "RDN for netgroup storage."
+msgstr "RDN für die Ablage von Netgroups."
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.tpl:12
+#: admin/netgroups/class_netgroup.inc:713 admin/netgroups/generic.tpl:37
+#: admin/netgroups/tripleSelect/triple-list.tpl:12
+#: admin/netgroups/netgroup-list.tpl:12
+msgid "Base"
+msgstr "Basis"
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-filter.xml:20
+#: admin/netgroups/netgroup-filter.xml:18
+msgid "Default filter"
+msgstr "Standard-Filter"
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:10
+msgid "Please select the desired NIS Netgroups"
+msgstr "Bitte wählen Sie die gewünschten NIS Netgroups"
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:40
+#: admin/netgroups/tripleSelect/triple-list.xml:80
+msgid "Common name"
+msgstr "Gewöhnlicher Name"
+
+#: admin/netgroups/netgroup-list.xml:11
+msgid "List of NIS Netgroups"
+msgstr "NIS Netgroups Liste"
+
+#: admin/netgroups/netgroup-list.xml:57
+msgid "Properties"
+msgstr "Eigenschaften"
+
+#: admin/netgroups/netgroup-list.xml:62
+msgid "Actions"
+msgstr "Aktionen"
+
+#: admin/netgroups/netgroup-list.xml:73
+msgid "Create"
+msgstr "Anlegen"
+
+#: admin/netgroups/netgroup-list.xml:91
+msgid "Edit"
+msgstr "Bearbeiten"
+
+#: admin/netgroups/netgroup-list.xml:98
+msgid "Remove"
+msgstr "Löschen"
+
+#: admin/netgroups/netgroup-list.xml:130
+msgid "Edit NIS Netgroup"
+msgstr "NIS Netgroup bearbeiten"
+
+#: admin/netgroups/netgroup-list.xml:143
+msgid "Remove NIS Netgroup"
+msgstr "NIS Netgroup löschen"
+
+#: admin/netgroups/class_netgroup.inc:120
+msgid "Domain"
+msgstr "Domäne"
+
+#: admin/netgroups/class_netgroup.inc:330
+msgid "Failed to add triple"
+msgstr "Tripple konnte nicht hinzugefügt werden"
+
+#: admin/netgroups/class_netgroup.inc:330
+#, php-format
+msgid "Unable to detect FQDN for host '%s'!"
+msgstr ""
+"Der voll qualifizierte Hostname für '%s' konnte nicht ermittelt werden!"
+
+#: admin/netgroups/class_netgroup.inc:437
+#: admin/netgroups/class_netgroup.inc:564
+msgid "LDAP error"
+msgstr "LDAP Fehler"
+
+#: admin/netgroups/class_netgroup.inc:489
+#: admin/netgroups/class_netgroup.inc:756
+msgid "Error"
+msgstr "Fehler"
+
+#: admin/netgroups/class_netgroup.inc:671
+msgid "NIS Netgroup Error"
+msgstr "NIS Netgroup Fehler"
+
+#: admin/netgroups/class_netgroup.inc:671
+msgid "Error: There are a loop with NIS Netgroups"
+msgstr "Fehler: Es gibt eine Schleife mit NIS Netgroups"
+
+#: admin/netgroups/class_netgroup.inc:673
+msgid "IMPORTANT: Check the members of NIS Netgroup"
+msgstr "WICHTIG: Überprüfen Sie die NIS Netgroup Mitglieder"
+
+#: admin/netgroups/class_netgroup.inc:703
+msgid "Generic"
+msgstr "Allgemein"
+
+#: admin/netgroups/class_netgroup.inc:704
+msgid "Generic NIS Netgroup settings"
+msgstr "Allgemeine NIS Netgroup Einstellungen"
+
+#: admin/netgroups/class_netgroup.inc:709
+#: admin/netgroups/class_netgroupManagement.inc:27
+msgid "NIS Netgroups"
+msgstr "NIS Netgroups"
+
+#: admin/netgroups/class_netgroup.inc:714 admin/netgroups/generic.tpl:57
+msgid "NIS Netgroup members"
+msgstr "NIS Netgroup Mitglieder"
+
+#: admin/netgroups/generic.tpl:11
+msgid "NIS Netgroup name"
+msgstr "NIS Netgroup Name"
+
+#: admin/netgroups/generic.tpl:14
+msgid "Multiple edit"
+msgstr "Mehrere bearbeiten"
+
+#: admin/netgroups/generic.tpl:18
+msgid "Name of the NIS Netgroup"
+msgstr "NIS Netgroup Name"
+
+#: admin/netgroups/generic.tpl:30
+msgid "Descriptive text for this NIS Netgroup"
+msgstr "NIS Netgroup Beschreibung"
+
+#: admin/netgroups/tripleSelect/triple-filter.xml:18
+msgid "Default"
+msgstr "Standard"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:10
+msgid "Please select the desired entries"
+msgstr "Bitte wählen Sie die gewünschten Einträge"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:22
+msgid "User"
+msgstr "Benutzer"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:30
+msgid "Server"
+msgstr "Server"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:38
+msgid "Workstation"
+msgstr "Arbeitsplatzrechner"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:46
+msgid "Terminal"
+msgstr "Terminal"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:54
+msgid "Component"
+msgstr "Komponente"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:88
+msgid "Login"
+msgstr "Login"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:96
+msgid "Surname"
+msgstr "Nachname"
+
+#: admin/netgroups/class_netgroupManagement.inc:28
+msgid "NIS Netgroups management"
+msgstr "NIS Netgroups Verwaltung"
+
+#~ msgid "Filter"
+#~ msgstr "Filter"
+
+#~ msgid "Show NIS Netgroups"
+#~ msgstr "NIS Netgroups anzeigen"
+
+#~ msgid "Show Users"
+#~ msgstr "Benutzer anzeigen"
+
+#~ msgid "Show Hosts"
+#~ msgstr "Hosts anzeigen"
+
+#~ msgid "Show NIS Netgroup"
+#~ msgstr "NIS Netgroup anzeigen"
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/es/LC_MESSAGES/messages.po
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/es/LC_MESSAGES/messages.po (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/es/LC_MESSAGES/messages.po 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,295 @@
+# Header entry was created by Lokalize.
+#
+# thoth, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-27 16:57+0200\n"
+"PO-Revision-Date: 2011-05-12 02:26+0200\n"
+"Last-Translator: thoth\n"
+"Language-Team: Spanish <>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.0\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: personal/netgroups/class_netgroupAccount.inc:28
+#: personal/netgroups/class_netgroupAccount.inc:335
+#: admin/systems/netgroups/class_netgroupSystem.inc:27
+#: admin/systems/netgroups/class_netgroupSystem.inc:312
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:14
+#: admin/netgroups/netgroup-list.xml:15 admin/netgroups/netgroup-list.xml:79
+#: admin/netgroups/tripleSelect/triple-list.xml:14
+msgid "NIS Netgroup"
+msgstr "NIS Netgroup"
+
+#: personal/netgroups/class_netgroupAccount.inc:29
+msgid "Choose NIS Netgroups for the user"
+msgstr "Elija los NIS Netgroups para el usuario"
+
+#: personal/netgroups/class_netgroupAccount.inc:89
+#: admin/systems/netgroups/class_netgroupSystem.inc:103
+#: admin/netgroups/netgroup-list.xml:41 admin/netgroups/class_netgroup.inc:120
+#: admin/netgroups/class_netgroup.inc:587
+#: admin/netgroups/class_netgroup.inc:597
+#: admin/netgroups/class_netgroup.inc:599
+#: admin/netgroups/class_netgroup.inc:711
+msgid "Name"
+msgstr "Nombre"
+
+#: personal/netgroups/class_netgroupAccount.inc:89
+#: admin/systems/netgroups/class_netgroupSystem.inc:103
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:48
+#: admin/netgroups/netgroup-list.xml:49 admin/netgroups/class_netgroup.inc:120
+#: admin/netgroups/class_netgroup.inc:712 admin/netgroups/generic.tpl:25
+#: admin/netgroups/tripleSelect/triple-list.xml:104
+msgid "Description"
+msgstr "Descripción"
+
+#: personal/netgroups/class_netgroupAccount.inc:327
+#: admin/systems/netgroups/class_netgroupSystem.inc:293
+msgid "NIS Netgroup member"
+msgstr "Miembro del NIS Netgroup"
+
+#: personal/netgroups/netgroupAccount.tpl:1
+#: admin/systems/netgroups/netgroupSystem.tpl:7
+msgid "Member of the following NIS Netgroups"
+msgstr "Miembros de los siguientes NIS Netgroups"
+
+#: admin/systems/netgroups/netgroupSystem.tpl:2
+#, fuzzy
+msgid "This host cannot be added to NIS Netgroups"
+msgstr "Por favor seleccione los NIS Netgroups que desee"
+
+#: admin/systems/netgroups/netgroupSystem.tpl:3
+msgid ""
+"Only hosts with a fully qualified domain name or those with DNS settings "
+"enabled in GOsa can be added to NIS Netgroups!"
+msgstr ""
+
+#: admin/systems/netgroups/class_netgroupSystem.inc:28
+#, fuzzy
+msgid "Choose NIS Netgroups for the system"
+msgstr "Elija los NIS Netgroups para el usuario"
+
+#: admin/systems/netgroups/class_netgroupSystem.inc:305
+msgid "RDN for netgroup storage."
+msgstr ""
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.tpl:12
+#: admin/netgroups/class_netgroup.inc:713 admin/netgroups/generic.tpl:37
+#: admin/netgroups/tripleSelect/triple-list.tpl:12
+#: admin/netgroups/netgroup-list.tpl:12
+msgid "Base"
+msgstr "Base"
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-filter.xml:20
+#: admin/netgroups/netgroup-filter.xml:18
+msgid "Default filter"
+msgstr ""
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:10
+msgid "Please select the desired NIS Netgroups"
+msgstr "Por favor seleccione los NIS Netgroups que desee"
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:40
+#: admin/netgroups/tripleSelect/triple-list.xml:80
+msgid "Common name"
+msgstr "Nombre común"
+
+#: admin/netgroups/netgroup-list.xml:11
+msgid "List of NIS Netgroups"
+msgstr "Lista de NIS Netgroups"
+
+#: admin/netgroups/netgroup-list.xml:57
+msgid "Properties"
+msgstr "Propiedades"
+
+#: admin/netgroups/netgroup-list.xml:62
+msgid "Actions"
+msgstr "Acciones"
+
+#: admin/netgroups/netgroup-list.xml:73
+msgid "Create"
+msgstr "Crear"
+
+#: admin/netgroups/netgroup-list.xml:91
+msgid "Edit"
+msgstr "Editar"
+
+#: admin/netgroups/netgroup-list.xml:98
+msgid "Remove"
+msgstr "Eliminar"
+
+#: admin/netgroups/netgroup-list.xml:130
+msgid "Edit NIS Netgroup"
+msgstr "Editar NIS Netgroup"
+
+#: admin/netgroups/netgroup-list.xml:143
+msgid "Remove NIS Netgroup"
+msgstr "Eliminar NIS Netgroup"
+
+#: admin/netgroups/class_netgroup.inc:120
+msgid "Domain"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:330
+msgid "Failed to add triple"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:330
+#, php-format
+msgid "Unable to detect FQDN for host '%s'!"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:437
+#: admin/netgroups/class_netgroup.inc:564
+msgid "LDAP error"
+msgstr "Error LDAP"
+
+#: admin/netgroups/class_netgroup.inc:489
+#: admin/netgroups/class_netgroup.inc:756
+msgid "Error"
+msgstr "Error"
+
+#: admin/netgroups/class_netgroup.inc:671
+msgid "NIS Netgroup Error"
+msgstr "Error en NIS Netgroup"
+
+#: admin/netgroups/class_netgroup.inc:671
+msgid "Error: There are a loop with NIS Netgroups"
+msgstr "Error: Existe un bucle en los NIS Netgroups"
+
+#: admin/netgroups/class_netgroup.inc:673
+msgid "IMPORTANT: Check the members of NIS Netgroup"
+msgstr "IMPORTANTE: Compruebe los miembros del NIS Netgroup"
+
+#: admin/netgroups/class_netgroup.inc:703
+msgid "Generic"
+msgstr "Genérico"
+
+#: admin/netgroups/class_netgroup.inc:704
+msgid "Generic NIS Netgroup settings"
+msgstr "Parámetros genéricos de NIS Netgroup"
+
+#: admin/netgroups/class_netgroup.inc:709
+#: admin/netgroups/class_netgroupManagement.inc:27
+msgid "NIS Netgroups"
+msgstr "NIS Netgroups"
+
+#: admin/netgroups/class_netgroup.inc:714 admin/netgroups/generic.tpl:57
+msgid "NIS Netgroup members"
+msgstr "Miembros del NIS Netgroup"
+
+#: admin/netgroups/generic.tpl:11
+msgid "NIS Netgroup name"
+msgstr "Nombre NIS Netgroup"
+
+#: admin/netgroups/generic.tpl:14
+msgid "Multiple edit"
+msgstr "Edición multiple"
+
+#: admin/netgroups/generic.tpl:18
+msgid "Name of the NIS Netgroup"
+msgstr "Nombre del NIS Netgroup"
+
+#: admin/netgroups/generic.tpl:30
+msgid "Descriptive text for this NIS Netgroup"
+msgstr "Texto descriptivo para este NIS Netgroup"
+
+#: admin/netgroups/tripleSelect/triple-filter.xml:18
+msgid "Default"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:10
+msgid "Please select the desired entries"
+msgstr "Por favor seleccione las entradas que desee"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:22
+msgid "User"
+msgstr "Usuario"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:30
+msgid "Server"
+msgstr "Servidor"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:38
+msgid "Workstation"
+msgstr "Estación de trabajo"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:46
+msgid "Terminal"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:54
+msgid "Component"
+msgstr "componente"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:88
+msgid "Login"
+msgstr "Inicio"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:96
+msgid "Surname"
+msgstr "Apellido"
+
+#: admin/netgroups/class_netgroupManagement.inc:28
+msgid "NIS Netgroups management"
+msgstr "Administración NIS Netgroups"
+
+#~ msgid "Filter"
+#~ msgstr "Filtro"
+
+#~ msgid "Show NIS Netgroups"
+#~ msgstr "Mostrar NIS Netgroups"
+
+#~ msgid "Show Users"
+#~ msgstr "Mostrar usuarios"
+
+#~ msgid "Show Hosts"
+#~ msgstr "Mostrar equipos"
+
+#~ msgid "Show NIS Netgroup"
+#~ msgstr "Mostrar NIS Netgroup"
+
+#~ msgid "In all NIS Netgroups"
+#~ msgstr "En todos los NIS Netgroups"
+
+#~ msgid "Not in all NIS Netgroups"
+#~ msgstr "En ningún NIS Netgroups"
+
+#~ msgid "Choose NIS Netgroups for the host"
+#~ msgstr "Elija los NIS Netgroups para el equipo"
+
+#, fuzzy
+#~ msgid "Add CN/UID '%s' to NIS netgroup '%s' failed: cannot find object!"
+#~ msgstr ""
+#~ "¡Añadir CN/UID '%s' al NIS netgroup '%s ha fallado: no podemos encontrar "
+#~ "el objeto!"
+
+#~ msgid "! unknown UID/CN"
+#~ msgstr "¡CN/UID desconocido!"
+
+#~ msgid "Host"
+#~ msgstr "Nombre de equipo"
+
+#~ msgid "Network Device"
+#~ msgstr "Dispositivo de Red"
+
+#~ msgid ""
+#~ "Add CN/UID '%s' to NIS netgroup '%s' failed: CN/UID is used more than "
+#~ "once!"
+#~ msgstr ""
+#~ "¡Añadir CN/UID '%s' al NIS netgroup '%s ha fallado: el CN/UID es usado "
+#~ "mas de una vez!"
+
+#, fuzzy
+#~ msgid "nisNetgroup"
+#~ msgstr "NetGroups"
+
+#, fuzzy
+#~ msgid "nisNetgroup member"
+#~ msgstr "Miembros del NIS Netgroup"
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/fr/LC_MESSAGES/messages.po
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/fr/LC_MESSAGES/messages.po (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/fr/LC_MESSAGES/messages.po 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,281 @@
+# translation of messages.po to
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Benoit Mortier <benoit.mortier at opensides.be>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: messages\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-27 16:57+0200\n"
+"PO-Revision-Date: 2011-06-26 00:01+0200\n"
+"Last-Translator: Benoit Mortier <benoit.mortier at opensides.be>\n"
+"Language-Team: <fr at li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: personal/netgroups/class_netgroupAccount.inc:28
+#: personal/netgroups/class_netgroupAccount.inc:335
+#: admin/systems/netgroups/class_netgroupSystem.inc:27
+#: admin/systems/netgroups/class_netgroupSystem.inc:312
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:14
+#: admin/netgroups/netgroup-list.xml:15 admin/netgroups/netgroup-list.xml:79
+#: admin/netgroups/tripleSelect/triple-list.xml:14
+msgid "NIS Netgroup"
+msgstr "Groupe NIS"
+
+#: personal/netgroups/class_netgroupAccount.inc:29
+msgid "Choose NIS Netgroups for the user"
+msgstr "Choisissez le groupe NIS de l'utilisateur"
+
+#: personal/netgroups/class_netgroupAccount.inc:89
+#: admin/systems/netgroups/class_netgroupSystem.inc:103
+#: admin/netgroups/netgroup-list.xml:41 admin/netgroups/class_netgroup.inc:120
+#: admin/netgroups/class_netgroup.inc:587
+#: admin/netgroups/class_netgroup.inc:597
+#: admin/netgroups/class_netgroup.inc:599
+#: admin/netgroups/class_netgroup.inc:711
+msgid "Name"
+msgstr "Nom"
+
+#: personal/netgroups/class_netgroupAccount.inc:89
+#: admin/systems/netgroups/class_netgroupSystem.inc:103
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:48
+#: admin/netgroups/netgroup-list.xml:49 admin/netgroups/class_netgroup.inc:120
+#: admin/netgroups/class_netgroup.inc:712 admin/netgroups/generic.tpl:25
+#: admin/netgroups/tripleSelect/triple-list.xml:104
+msgid "Description"
+msgstr ""
+
+#: personal/netgroups/class_netgroupAccount.inc:327
+#: admin/systems/netgroups/class_netgroupSystem.inc:293
+msgid "NIS Netgroup member"
+msgstr "Membre d'un groupe NIS"
+
+#: personal/netgroups/netgroupAccount.tpl:1
+#: admin/systems/netgroups/netgroupSystem.tpl:7
+msgid "Member of the following NIS Netgroups"
+msgstr "Membre des groupes NIS suivants"
+
+#: admin/systems/netgroups/netgroupSystem.tpl:2
+#, fuzzy
+msgid "This host cannot be added to NIS Netgroups"
+msgstr "Veuillez sélectionner le groupe NIS désiré"
+
+#: admin/systems/netgroups/netgroupSystem.tpl:3
+msgid ""
+"Only hosts with a fully qualified domain name or those with DNS settings "
+"enabled in GOsa can be added to NIS Netgroups!"
+msgstr ""
+
+#: admin/systems/netgroups/class_netgroupSystem.inc:28
+#, fuzzy
+msgid "Choose NIS Netgroups for the system"
+msgstr "Choisissez le groupe NIS de l'utilisateur"
+
+#: admin/systems/netgroups/class_netgroupSystem.inc:305
+msgid "RDN for netgroup storage."
+msgstr ""
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.tpl:12
+#: admin/netgroups/class_netgroup.inc:713 admin/netgroups/generic.tpl:37
+#: admin/netgroups/tripleSelect/triple-list.tpl:12
+#: admin/netgroups/netgroup-list.tpl:12
+msgid "Base"
+msgstr ""
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-filter.xml:20
+#: admin/netgroups/netgroup-filter.xml:18
+msgid "Default filter"
+msgstr ""
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:10
+msgid "Please select the desired NIS Netgroups"
+msgstr "Veuillez sélectionner le groupe NIS désiré"
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:40
+#: admin/netgroups/tripleSelect/triple-list.xml:80
+msgid "Common name"
+msgstr "Nom commun"
+
+#: admin/netgroups/netgroup-list.xml:11
+msgid "List of NIS Netgroups"
+msgstr "Liste des groupes NIS"
+
+#: admin/netgroups/netgroup-list.xml:57
+msgid "Properties"
+msgstr "Propriétés"
+
+#: admin/netgroups/netgroup-list.xml:62
+msgid "Actions"
+msgstr ""
+
+#: admin/netgroups/netgroup-list.xml:73
+msgid "Create"
+msgstr "Créer"
+
+#: admin/netgroups/netgroup-list.xml:91
+msgid "Edit"
+msgstr "Editer"
+
+#: admin/netgroups/netgroup-list.xml:98
+msgid "Remove"
+msgstr "Effacer"
+
+#: admin/netgroups/netgroup-list.xml:130
+msgid "Edit NIS Netgroup"
+msgstr "Editer le groupe NIS"
+
+#: admin/netgroups/netgroup-list.xml:143
+msgid "Remove NIS Netgroup"
+msgstr "Effacer le groupe NIS"
+
+#: admin/netgroups/class_netgroup.inc:120
+msgid "Domain"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:330
+msgid "Failed to add triple"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:330
+#, php-format
+msgid "Unable to detect FQDN for host '%s'!"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:437
+#: admin/netgroups/class_netgroup.inc:564
+msgid "LDAP error"
+msgstr "Erreur LDAP"
+
+#: admin/netgroups/class_netgroup.inc:489
+#: admin/netgroups/class_netgroup.inc:756
+msgid "Error"
+msgstr "Erreur"
+
+#: admin/netgroups/class_netgroup.inc:671
+msgid "NIS Netgroup Error"
+msgstr "Erreur de groupe NIS"
+
+#: admin/netgroups/class_netgroup.inc:671
+msgid "Error: There are a loop with NIS Netgroups"
+msgstr "Erreur: il y a une boucle dans les groupes NIS"
+
+#: admin/netgroups/class_netgroup.inc:673
+msgid "IMPORTANT: Check the members of NIS Netgroup"
+msgstr "IMPORTANT: vérifier les membres du groupe NIS"
+
+#: admin/netgroups/class_netgroup.inc:703
+msgid "Generic"
+msgstr "Générique"
+
+#: admin/netgroups/class_netgroup.inc:704
+msgid "Generic NIS Netgroup settings"
+msgstr "Paramètres de base des groupes NIS"
+
+#: admin/netgroups/class_netgroup.inc:709
+#: admin/netgroups/class_netgroupManagement.inc:27
+msgid "NIS Netgroups"
+msgstr "Groupes NIS"
+
+#: admin/netgroups/class_netgroup.inc:714 admin/netgroups/generic.tpl:57
+msgid "NIS Netgroup members"
+msgstr "Membres d'un groupe NIS"
+
+#: admin/netgroups/generic.tpl:11
+msgid "NIS Netgroup name"
+msgstr "Nom du groupe NIS"
+
+#: admin/netgroups/generic.tpl:14
+msgid "Multiple edit"
+msgstr "Edition multiple"
+
+#: admin/netgroups/generic.tpl:18
+msgid "Name of the NIS Netgroup"
+msgstr "Nom du groupe NIS"
+
+#: admin/netgroups/generic.tpl:30
+msgid "Descriptive text for this NIS Netgroup"
+msgstr "Description du groupe NIS"
+
+#: admin/netgroups/tripleSelect/triple-filter.xml:18
+msgid "Default"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:10
+msgid "Please select the desired entries"
+msgstr "Veuillez sélectionner les entrée désirées"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:22
+msgid "User"
+msgstr "Utilisateur"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:30
+msgid "Server"
+msgstr "Serveur"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:38
+msgid "Workstation"
+msgstr "Poste de travail"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:46
+msgid "Terminal"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:54
+msgid "Component"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:88
+msgid "Login"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:96
+msgid "Surname"
+msgstr "Nom"
+
+#: admin/netgroups/class_netgroupManagement.inc:28
+msgid "NIS Netgroups management"
+msgstr "Gestion des groupes NIS"
+
+#~ msgid "Filter"
+#~ msgstr "Filtre"
+
+#~ msgid "Show NIS Netgroups"
+#~ msgstr "Montrer les groupes NIS"
+
+#~ msgid "Show Users"
+#~ msgstr "Montrer les utilisateurs"
+
+#~ msgid "Show Hosts"
+#~ msgstr "Montrer les hôtes"
+
+#~ msgid "Show NIS Netgroup"
+#~ msgstr "Montrer les groupes NIS"
+
+#~ msgid "In all NIS Netgroups"
+#~ msgstr "Dans tout les groupes NIS"
+
+#~ msgid "Not in all NIS Netgroups"
+#~ msgstr "Pas dans tout les groupes NIS"
+
+#~ msgid "Choose NIS Netgroups for the host"
+#~ msgstr "Choisir le groupe NIS pour l'hôte"
+
+#~ msgid "Add CN/UID '%s' to NIS netgroup '%s' failed: cannot find object!"
+#~ msgstr ""
+#~ "L'ajout du CN/UID '%s' au groupe NIS '%s' a échoué: impossible de trouver "
+#~ "l'objet !"
+
+#~ msgid "! unknown UID/CN"
+#~ msgstr "! UID/CN inconnu"
+
+#~ msgid "Host"
+#~ msgstr "Hôte"
+
+#~ msgid "Network Device"
+#~ msgstr "Périphérique réseau"
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/messages.po
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/messages.po (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/messages.po 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,240 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-27 16:57+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: personal/netgroups/class_netgroupAccount.inc:28
+#: personal/netgroups/class_netgroupAccount.inc:335
+#: admin/systems/netgroups/class_netgroupSystem.inc:27
+#: admin/systems/netgroups/class_netgroupSystem.inc:312
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:14
+#: admin/netgroups/netgroup-list.xml:15 admin/netgroups/netgroup-list.xml:79
+#: admin/netgroups/tripleSelect/triple-list.xml:14
+msgid "NIS Netgroup"
+msgstr ""
+
+#: personal/netgroups/class_netgroupAccount.inc:29
+msgid "Choose NIS Netgroups for the user"
+msgstr ""
+
+#: personal/netgroups/class_netgroupAccount.inc:89
+#: admin/systems/netgroups/class_netgroupSystem.inc:103
+#: admin/netgroups/netgroup-list.xml:41 admin/netgroups/class_netgroup.inc:120
+#: admin/netgroups/class_netgroup.inc:587
+#: admin/netgroups/class_netgroup.inc:597
+#: admin/netgroups/class_netgroup.inc:599
+#: admin/netgroups/class_netgroup.inc:711
+msgid "Name"
+msgstr ""
+
+#: personal/netgroups/class_netgroupAccount.inc:89
+#: admin/systems/netgroups/class_netgroupSystem.inc:103
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:48
+#: admin/netgroups/netgroup-list.xml:49 admin/netgroups/class_netgroup.inc:120
+#: admin/netgroups/class_netgroup.inc:712 admin/netgroups/generic.tpl:25
+#: admin/netgroups/tripleSelect/triple-list.xml:104
+msgid "Description"
+msgstr ""
+
+#: personal/netgroups/class_netgroupAccount.inc:327
+#: admin/systems/netgroups/class_netgroupSystem.inc:293
+msgid "NIS Netgroup member"
+msgstr ""
+
+#: personal/netgroups/netgroupAccount.tpl:1
+#: admin/systems/netgroups/netgroupSystem.tpl:7
+msgid "Member of the following NIS Netgroups"
+msgstr ""
+
+#: admin/systems/netgroups/netgroupSystem.tpl:2
+msgid "This host cannot be added to NIS Netgroups"
+msgstr ""
+
+#: admin/systems/netgroups/netgroupSystem.tpl:3
+msgid ""
+"Only hosts with a fully qualified domain name or those with DNS settings "
+"enabled in GOsa can be added to NIS Netgroups!"
+msgstr ""
+
+#: admin/systems/netgroups/class_netgroupSystem.inc:28
+msgid "Choose NIS Netgroups for the system"
+msgstr ""
+
+#: admin/systems/netgroups/class_netgroupSystem.inc:305
+msgid "RDN for netgroup storage."
+msgstr ""
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.tpl:12
+#: admin/netgroups/class_netgroup.inc:713 admin/netgroups/generic.tpl:37
+#: admin/netgroups/tripleSelect/triple-list.tpl:12
+#: admin/netgroups/netgroup-list.tpl:12
+msgid "Base"
+msgstr ""
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-filter.xml:20
+#: admin/netgroups/netgroup-filter.xml:18
+msgid "Default filter"
+msgstr ""
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:10
+msgid "Please select the desired NIS Netgroups"
+msgstr ""
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:40
+#: admin/netgroups/tripleSelect/triple-list.xml:80
+msgid "Common name"
+msgstr ""
+
+#: admin/netgroups/netgroup-list.xml:11
+msgid "List of NIS Netgroups"
+msgstr ""
+
+#: admin/netgroups/netgroup-list.xml:57
+msgid "Properties"
+msgstr ""
+
+#: admin/netgroups/netgroup-list.xml:62
+msgid "Actions"
+msgstr ""
+
+#: admin/netgroups/netgroup-list.xml:73
+msgid "Create"
+msgstr ""
+
+#: admin/netgroups/netgroup-list.xml:91
+msgid "Edit"
+msgstr ""
+
+#: admin/netgroups/netgroup-list.xml:98
+msgid "Remove"
+msgstr ""
+
+#: admin/netgroups/netgroup-list.xml:130
+msgid "Edit NIS Netgroup"
+msgstr ""
+
+#: admin/netgroups/netgroup-list.xml:143
+msgid "Remove NIS Netgroup"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:120
+msgid "Domain"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:330
+msgid "Failed to add triple"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:330
+#, php-format
+msgid "Unable to detect FQDN for host '%s'!"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:437
+#: admin/netgroups/class_netgroup.inc:564
+msgid "LDAP error"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:489
+#: admin/netgroups/class_netgroup.inc:756
+msgid "Error"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:671
+msgid "NIS Netgroup Error"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:671
+msgid "Error: There are a loop with NIS Netgroups"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:673
+msgid "IMPORTANT: Check the members of NIS Netgroup"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:703
+msgid "Generic"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:704
+msgid "Generic NIS Netgroup settings"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:709
+#: admin/netgroups/class_netgroupManagement.inc:27
+msgid "NIS Netgroups"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:714 admin/netgroups/generic.tpl:57
+msgid "NIS Netgroup members"
+msgstr ""
+
+#: admin/netgroups/generic.tpl:11
+msgid "NIS Netgroup name"
+msgstr ""
+
+#: admin/netgroups/generic.tpl:14
+msgid "Multiple edit"
+msgstr ""
+
+#: admin/netgroups/generic.tpl:18
+msgid "Name of the NIS Netgroup"
+msgstr ""
+
+#: admin/netgroups/generic.tpl:30
+msgid "Descriptive text for this NIS Netgroup"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-filter.xml:18
+msgid "Default"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:10
+msgid "Please select the desired entries"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:22
+msgid "User"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:30
+msgid "Server"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:38
+msgid "Workstation"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:46
+msgid "Terminal"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:54
+msgid "Component"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:88
+msgid "Login"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:96
+msgid "Surname"
+msgstr ""
+
+#: admin/netgroups/class_netgroupManagement.inc:28
+msgid "NIS Netgroups management"
+msgstr ""
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/nb/LC_MESSAGES/messages.po
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/nb/LC_MESSAGES/messages.po (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/locale/nb/LC_MESSAGES/messages.po 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,272 @@
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Petter Reinholdtsen <pere at hungry.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-27 16:57+0200\n"
+"PO-Revision-Date: 2012-01-10 20:13+0100\n"
+"Last-Translator: Petter Reinholdtsen <pere at hungry.com>\n"
+"Language-Team: Norwegian Bokmål <i18n-nb at lister.ping.uio.no>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.0\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: personal/netgroups/class_netgroupAccount.inc:28
+#: personal/netgroups/class_netgroupAccount.inc:335
+#: admin/systems/netgroups/class_netgroupSystem.inc:27
+#: admin/systems/netgroups/class_netgroupSystem.inc:312
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:14
+#: admin/netgroups/netgroup-list.xml:15 admin/netgroups/netgroup-list.xml:79
+#: admin/netgroups/tripleSelect/triple-list.xml:14
+msgid "NIS Netgroup"
+msgstr "NIS-nettgruppe"
+
+#: personal/netgroups/class_netgroupAccount.inc:29
+msgid "Choose NIS Netgroups for the user"
+msgstr "Velg NIS-nettgrupper for brukeren"
+
+#: personal/netgroups/class_netgroupAccount.inc:89
+#: admin/systems/netgroups/class_netgroupSystem.inc:103
+#: admin/netgroups/netgroup-list.xml:41 admin/netgroups/class_netgroup.inc:120
+#: admin/netgroups/class_netgroup.inc:587
+#: admin/netgroups/class_netgroup.inc:597
+#: admin/netgroups/class_netgroup.inc:599
+#: admin/netgroups/class_netgroup.inc:711
+msgid "Name"
+msgstr "Navn"
+
+#: personal/netgroups/class_netgroupAccount.inc:89
+#: admin/systems/netgroups/class_netgroupSystem.inc:103
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:48
+#: admin/netgroups/netgroup-list.xml:49 admin/netgroups/class_netgroup.inc:120
+#: admin/netgroups/class_netgroup.inc:712 admin/netgroups/generic.tpl:25
+#: admin/netgroups/tripleSelect/triple-list.xml:104
+msgid "Description"
+msgstr "Beskrivelse"
+
+#: personal/netgroups/class_netgroupAccount.inc:327
+#: admin/systems/netgroups/class_netgroupSystem.inc:293
+msgid "NIS Netgroup member"
+msgstr "NIS-nettgruppemedlem"
+
+#: personal/netgroups/netgroupAccount.tpl:1
+#: admin/systems/netgroups/netgroupSystem.tpl:7
+msgid "Member of the following NIS Netgroups"
+msgstr "Medlem av de følgende NIS-nettgrupper"
+
+#: admin/systems/netgroups/netgroupSystem.tpl:2
+#, fuzzy
+msgid "This host cannot be added to NIS Netgroups"
+msgstr "Velg ønsket NIS-nettgrupper"
+
+#: admin/systems/netgroups/netgroupSystem.tpl:3
+msgid ""
+"Only hosts with a fully qualified domain name or those with DNS settings "
+"enabled in GOsa can be added to NIS Netgroups!"
+msgstr ""
+
+#: admin/systems/netgroups/class_netgroupSystem.inc:28
+#, fuzzy
+msgid "Choose NIS Netgroups for the system"
+msgstr "Velg NIS-nettgrupper for brukeren"
+
+#: admin/systems/netgroups/class_netgroupSystem.inc:305
+msgid "RDN for netgroup storage."
+msgstr ""
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.tpl:12
+#: admin/netgroups/class_netgroup.inc:713 admin/netgroups/generic.tpl:37
+#: admin/netgroups/tripleSelect/triple-list.tpl:12
+#: admin/netgroups/netgroup-list.tpl:12
+msgid "Base"
+msgstr ""
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-filter.xml:20
+#: admin/netgroups/netgroup-filter.xml:18
+msgid "Default filter"
+msgstr ""
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:10
+msgid "Please select the desired NIS Netgroups"
+msgstr "Velg ønsket NIS-nettgrupper"
+
+#: admin/netgroups/memberNisnetgroupSelect/memberNisnetgroup-list.xml:40
+#: admin/netgroups/tripleSelect/triple-list.xml:80
+msgid "Common name"
+msgstr ""
+
+#: admin/netgroups/netgroup-list.xml:11
+msgid "List of NIS Netgroups"
+msgstr "Liste med NIS-nettgrupper"
+
+#: admin/netgroups/netgroup-list.xml:57
+msgid "Properties"
+msgstr "Egenskaper"
+
+#: admin/netgroups/netgroup-list.xml:62
+msgid "Actions"
+msgstr ""
+
+#: admin/netgroups/netgroup-list.xml:73
+msgid "Create"
+msgstr "Opprett"
+
+#: admin/netgroups/netgroup-list.xml:91
+msgid "Edit"
+msgstr "Endre"
+
+#: admin/netgroups/netgroup-list.xml:98
+msgid "Remove"
+msgstr "Fjern"
+
+#: admin/netgroups/netgroup-list.xml:130
+msgid "Edit NIS Netgroup"
+msgstr "Endre NIS-nettgruppe"
+
+#: admin/netgroups/netgroup-list.xml:143
+msgid "Remove NIS Netgroup"
+msgstr "Fjern NIS-nettgruppe"
+
+#: admin/netgroups/class_netgroup.inc:120
+msgid "Domain"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:330
+msgid "Failed to add triple"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:330
+#, php-format
+msgid "Unable to detect FQDN for host '%s'!"
+msgstr ""
+
+#: admin/netgroups/class_netgroup.inc:437
+#: admin/netgroups/class_netgroup.inc:564
+msgid "LDAP error"
+msgstr "LDAP-feil"
+
+#: admin/netgroups/class_netgroup.inc:489
+#: admin/netgroups/class_netgroup.inc:756
+msgid "Error"
+msgstr "Feil"
+
+#: admin/netgroups/class_netgroup.inc:671
+msgid "NIS Netgroup Error"
+msgstr "NIS-nettgruppefeil"
+
+#: admin/netgroups/class_netgroup.inc:671
+msgid "Error: There are a loop with NIS Netgroups"
+msgstr "Feil: Det er en løkke i NIS-nettgruppene"
+
+#: admin/netgroups/class_netgroup.inc:673
+msgid "IMPORTANT: Check the members of NIS Netgroup"
+msgstr "VIKTIG: Sjekk medlemmene i NIS-nettgruppe"
+
+#: admin/netgroups/class_netgroup.inc:703
+msgid "Generic"
+msgstr "Generisk"
+
+#: admin/netgroups/class_netgroup.inc:704
+msgid "Generic NIS Netgroup settings"
+msgstr "Generiske NIS-nettgruppeoppsett"
+
+#: admin/netgroups/class_netgroup.inc:709
+#: admin/netgroups/class_netgroupManagement.inc:27
+msgid "NIS Netgroups"
+msgstr "NIS-nettgrupper"
+
+#: admin/netgroups/class_netgroup.inc:714 admin/netgroups/generic.tpl:57
+msgid "NIS Netgroup members"
+msgstr "NIS-nettgruppemedlemmer"
+
+#: admin/netgroups/generic.tpl:11
+msgid "NIS Netgroup name"
+msgstr "NIS-nettgruppenavn"
+
+#: admin/netgroups/generic.tpl:14
+msgid "Multiple edit"
+msgstr ""
+
+#: admin/netgroups/generic.tpl:18
+msgid "Name of the NIS Netgroup"
+msgstr "NIS-nettgruppens navn"
+
+#: admin/netgroups/generic.tpl:30
+msgid "Descriptive text for this NIS Netgroup"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-filter.xml:18
+msgid "Default"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:10
+msgid "Please select the desired entries"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:22
+msgid "User"
+msgstr "Bruker"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:30
+msgid "Server"
+msgstr "Tjener"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:38
+msgid "Workstation"
+msgstr "Arbeidsstasjon"
+
+#: admin/netgroups/tripleSelect/triple-list.xml:46
+msgid "Terminal"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:54
+msgid "Component"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:88
+msgid "Login"
+msgstr ""
+
+#: admin/netgroups/tripleSelect/triple-list.xml:96
+msgid "Surname"
+msgstr "Etternavn"
+
+#: admin/netgroups/class_netgroupManagement.inc:28
+msgid "NIS Netgroups management"
+msgstr "NIS-nettgruppeadministrasjon"
+
+#~ msgid "Filter"
+#~ msgstr "Filter"
+
+#~ msgid "Show NIS Netgroups"
+#~ msgstr "Vis NIS-nettgrupper"
+
+#~ msgid "Show Users"
+#~ msgstr "Vis brukere"
+
+#~ msgid "Show Hosts"
+#~ msgstr "Vis verter"
+
+#~ msgid "Show NIS Netgroup"
+#~ msgstr "Vis NIS-nettgruppe"
+
+#~ msgid "In all NIS Netgroups"
+#~ msgstr "I alle NIS-nettgrupper"
+
+#~ msgid "Not in all NIS Netgroups"
+#~ msgstr "Ikke i alle NIS-nettgrupper"
+
+#~ msgid "Choose NIS Netgroups for the host"
+#~ msgstr "Velg NIS-nettgrupper for denne verten"
+
+#~ msgid "Host"
+#~ msgstr "Vert"
+
+#~ msgid "Network Device"
+#~ msgstr "Nettverksenhet"
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/personal/netgroups/class_netgroupAccount.inc
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/personal/netgroups/class_netgroupAccount.inc (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/personal/netgroups/class_netgroupAccount.inc 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,389 @@
+<?php
+
+/* This code is part of GOsa-contrib (https://oss.gonicus.de/labs/gosa-contrib)
+ * Copyright (C) 2011 Alejandro Escanero Blanco (aescanero at gmail.com)
+ *
+ * Ported to GOsa 2.7 by Fabian Hickert (hickert at gonicus.de)
+ * Copyright (C) 2012 GONICUS GmbH
+ *
+ * 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 netgroupAccount extends plugin {
+ /* Definitions */
+
+ var $plHeadline = "NIS Netgroup";
+ var $plDescription = "Choose NIS Netgroups for the user";
+
+ /* Plugin specific values */
+ var $view_logged = FALSE;
+
+ /* attribute list for save action */
+ var $CopyPasteVars = array();
+ var $objectInfo = array();
+ var $attributes = array();
+ var $objectclasses = array("whatever");
+ var $uid = "";
+ var $netgroups = array();
+ var $initial_netgroups = array();
+ var $netgroupSelect = FALSE;
+ var $multiple_support = TRUE;
+ var $is_account = TRUE;
+ var $dn = "";
+ var $attrs = array();
+
+ var $netgroups_all = array();
+ var $netgroups_some = array();
+
+
+ /* Constructor: Prepare values, lists, ...
+ * */
+ function netgroupAccount(&$config, $dn= NULL)
+ {
+ $this->config = $config;
+
+ /* Load bases attributes */
+ plugin::plugin($config, $dn);
+
+ /* Setting uid to default */
+ if (isset($this->attrs['uid'][0])) {
+ $this->uid = $this->attrs['uid'][0];
+ }
+
+ if ($this->dn != "new") {
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=nisNetgroup)(nisNetgroupTriple=*))", array("cn", "nisNetgroupTriple"));
+ while ($attrs = $ldap->fetch()) {
+ foreach ($attrs['nisNetgroupTriple'] as $val) {
+ if (preg_match("/^\(\-?," . $this->uid . ",(\S*)\)$/", $val, $matches)) {
+ $this->addGroup($attrs['cn'][0]);
+ }
+ }
+ }
+ }
+
+ $this->initial_netgroups = $this->netgroups;
+
+ // Prepare lists
+ $this->memberList = new sortableListing(array(),array(), FALSE);
+ $this->memberList->setDeleteable(true);
+ $this->memberList->setInstantDelete(false);
+ $this->memberList->setEditable(false);
+ $this->memberList->setWidth("100%");
+ $this->memberList->setHeight("300px");
+ $this->memberList->setColspecs(array('20px','*','*'));
+ $this->memberList->setHeader(array("-",_("Name"),_("Description")));
+ $this->memberList->setDefaultSortColumn(1);
+ }
+
+
+ /* Removes a netgroup from this object
+ * */
+ function removeGroup($name)
+ {
+ unset($this->objectInfo[$name]);
+ unset($this->netgroups[$name]);
+ if(isset($this->netgroups_all[$name])){
+ unset($this->netgroups_all[$name]);
+ }
+ if(isset($this->netgroups_some[$name])){
+ unset($this->netgroups_some[$name]);
+ }
+ }
+
+
+ /* Adds a netgroup to this object
+ * */
+ function addGroup($name, $attrs=NULL)
+ {
+ if($attrs){
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=nisNetgroup)(cn=".normalizeldap($name)."))", array("cn", "description"));
+ if(!$ldap->count()){
+ return;
+ }
+ $attrs= $ldap->fetch();
+ }
+ $desc = " ";
+ if(isset($attrs['description'])){
+ $desc = $attrs['description'][0];
+ }
+ $this->removeGroup($name);
+ $this->objectInfo[$name] = array(image("plugins/netgroups/images/select_netgroup.png"), $name, $desc);
+ $this->netgroups[$name] = $name;
+ $this->netgroups_all[$name] = $name;
+ }
+
+
+ /* Render the gui.
+ * */
+ function multiple_execute() {
+ return($this->execute());
+ }
+ function execute($isCopyPaste = false) {
+ /* Call parent execute */
+ plugin::execute();
+ $display = "";
+
+ // Set list Acls
+ $this->memberList->setAcl($this->getacl("netgroups"));
+
+ /* Log view */
+ if ($this->is_account && !$this->view_logged) {
+ $this->view_logged = TRUE;
+ new log("view", "users/" . get_class($this), $this->dn);
+ }
+
+ if (isset($_POST['del_netgroups']) && isset($_POST['netgroups']) && preg_match("/w/", $this->getacl("netgroups"))) {
+ foreach ($_POST['netgroups'] as $value) {
+ unset($this->netgroups["$value"]);
+ if ($this->multiple_support_active) {
+ unset($this->netgroups_all["$value"]);
+ unset($this->netgroups_some["$value"]);
+ }
+ }
+ }
+
+ /* Add objects? */
+ if (isset($_POST["edit_membership"]) && preg_match("/w/", $this->getacl("netgroups"))) {
+ $this->netgroupSelect = new memberNisnetgroupSelect($this->config, get_userinfo());
+ $this->dialog = TRUE;
+ }
+
+ /* Add objects finished? */
+ if (isset($_POST["add_memberNisnetgroups_cancel"])) {
+ $this->netgroupSelect = NULL;
+ $this->dialog = FALSE;
+ }
+
+ /* Add to netgroup */
+ if (isset($_POST['add_memberNisnetgroups_finish']) && $this->netgroupSelect) {
+
+ /* Get all the dn from netgroupSelect */
+ $users = $this->netgroupSelect->detectPostActions();
+ if (isset($users['targets'])) {
+ $headpage = $this->netgroupSelect->getHeadpage();
+ foreach ($users['targets'] as $dn) {
+ $attrs = $headpage->getEntry($dn);
+ $this->addGroup($attrs['cn'][0]);
+ }
+ }
+ $this->netgroupSelect = NULL;
+ $this->dialog = FALSE;
+ }
+
+ /* Manage object add dialog */
+ if ($this->netgroupSelect) {
+ return($this->netgroupSelect->execute());
+ }
+
+ $data = $lData = array();
+ foreach($this->netgroups as $key => $name){
+ $data[$key] = $key;
+ $lData[$key] = array('data'=> $this->objectInfo[$name]);
+ }
+
+ foreach($this->netgroups_some as $key => $name){
+ $data[$key] = $name;
+ $list_data = $this->objectInfo[$key];
+ for($i=1;$i<3;$i++){
+ $list_data[$i] = "<font color='grey'>".$list_data[$i]."</font>";
+ }
+ $lData[$key] = array('data'=> $list_data);
+ }
+
+ $this->memberList->setListData($data, $lData);
+ $this->memberList->update();
+
+ // Assign smarty variables
+ $smarty = get_smarty();
+ $smarty->assign("memberList", $this->memberList->render());
+ $smarty->assign("netgroupsACL", $this->getacl("netgroups"));
+ $smarty->assign("memberCn_All", $this->netgroups_all);
+ $smarty->assign("memberCn_Some", $this->netgroups_some);
+ $display.= $smarty->fetch(get_template_path('netgroupAccount.tpl', TRUE, dirname(__FILE__)));
+ return($display);
+ }
+
+
+ /* Take care of HTML POST actions
+ * */
+ function multiple_save_object(){
+ if (isset($_POST['nisnetgroupedit'])) {
+ $this->save_object();
+ }
+ }
+ function save_object()
+ {
+ if (isset($_POST['nisnetgroupedit'])) {
+ plugin::save_object();
+
+ $this->memberList->save_object();
+ $action = $this->memberList->getAction();
+ if(isset($action['action']) && $action['action'] == 'delete'){
+ foreach($action['targets'] as $id){
+ $this->removeGroup($entry = $this->memberList->getKey($id));
+ }
+ }
+ }
+ }
+
+
+ /* Save changes back to the ldap.
+ * */
+ function save()
+ {
+ // If nothing has changed, just return
+ if(! (array_diff(array_keys($this->initial_netgroups), array_keys($this->netgroups)) ||
+ array_diff(array_keys($this->netgroups), array_keys($this->initial_netgroups)))){
+ return;
+ }
+
+ $to_add = $to_del = array();
+ foreach(array_keys($this->netgroups) as $val){
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=nisNetgroup)(cn=".$val."))", array("dn"));
+ while ($g_data = $ldap->fetch()) {
+ $to_add[] = $g_data['dn'];
+ }
+ }
+ foreach($to_add as $dn){
+ $ng = new netgroup($this->config, $dn);
+ $ng->addTriple(NULL, $this->uid, "", $this->attrs);
+ $ng->save();
+ }
+
+ $nonetgroups=array_diff(array_keys($this->initial_netgroups), array_keys($this->netgroups));
+ foreach($nonetgroups as $val){
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=nisNetgroup)(cn=".$val."))", array("dn"));
+ while ($g_data = $ldap->fetch()) {
+ $to_del[] = $g_data['dn'];
+ }
+ }
+ foreach($to_del as $dn){
+ $ng = new netgroup($this->config, $dn);
+ $ng->removeTriple($this->uid);
+ $ng->save();
+ }
+ }
+
+
+ /* Returns object modification after multi-edit process
+ * */
+ function get_multi_edit_values()
+ {
+ $ret = plugin::get_multi_edit_values();
+ foreach (array("base") as $attr) {
+ if (in_array($attr, $this->multi_boxes)) {
+ $ret[$attr] = $this->$attr;
+ }
+ }
+ $ret['netgroups'] = $this->netgroups;
+ $ret['netgroups_some'] = $this->netgroups_some;
+ return($ret);
+ }
+
+
+ /* Set collected multi-edit changes to this plugin
+ * */
+ function set_multi_edit_values($attrs)
+ {
+ $netgroups = array();
+ foreach ($attrs['netgroups_some'] as $uid => $value) {
+ if (in_array($uid, array_keys($this->initial_netgroups))) {
+ $netgroups[$uid] = $uid;
+ }
+ }
+ foreach ($attrs['netgroups'] as $uid => $value) {
+ $netgroups[$uid] = $uid;
+ }
+ plugin::set_multi_edit_values($attrs);
+ $this->netgroups = $netgroups;
+ }
+
+
+ /* Return plugin information
+ * */
+ static function plInfo() {
+ return (array(
+ "plDescription" => _("NIS Netgroup member"),
+ "plSelfModify" => FALSE,
+ "plDepends" => array("user"),
+ "plPriority" => 2,
+ "plSection" => array("personal"),
+ "plCategory" => array("users"),
+ "plOptions" => array(),
+ "plProvidedAcls" => array(
+ "netgroups" => _("NIS Netgroup"))
+ ));
+ }
+
+
+ /* Prepare this pkugin for multiple-edit.
+ * */
+ function init_multiple_support($attrs, $all)
+ {
+ plugin::init_multiple_support($attrs, $all);
+ $multiuid=$all["uid"];
+ $netgroup_map=array();
+
+ // Collect all groups
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=nisNetgroup)(nisNetgroupTriple=*))", array("cn", "nisNetgroupTriple", "description"));
+ $group_map = array();
+ while ($group = $ldap->fetch()) {
+ $name = $group['cn'][0];
+ $group_map[$name] = array('uid' => array());
+ foreach ($group['nisNetgroupTriple'] as $value) {
+ if (preg_match("/^\(\-?,(\S+),(\S*)\)$/", $value, $matches)) {
+ if(in_array($matches[1], $multiuid)){
+ $group_map[$name]['uid'][] = $matches[1];
+ $group_map[$name]['attrs'] = $group;
+ }
+ }
+ }
+ }
+
+ // Get groups used by some users
+ $this->netgroups = array();
+ foreach($group_map as $name => $data){
+ $uids = $data['uid'];
+ $inter = array_intersect($multiuid, $uids);
+ if(count($inter) && $multiuid["count"] != count($inter)){
+ $this->addGroup($name, $data['attrs']);
+ }
+ }
+ $this->netgroups_some = $this->netgroups;
+
+ // Get groups used by all users
+ $this->netgroups = array();
+ foreach($group_map as $name => $data){
+ $uids = $data['uid'];
+ $inter = array_intersect($multiuid, $uids);
+ if(count($inter) && $multiuid["count"] == count($inter)){
+ $this->addGroup($name, $data['attrs']);
+ }
+ }
+ }
+}
+
+?>
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/personal/netgroups/netgroupAccount.tpl
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/personal/netgroups/netgroupAccount.tpl (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/personal/netgroups/netgroupAccount.tpl 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,10 @@
+<b><LABEL for="netgroups">{t}Member of the following NIS Netgroups{/t}</LABEL></b>
+ {render acl=$netgroupsACL}
+ {$memberList}
+ {/render}
+<br>
+{render acl=$netgroupsACL}
+ <input type=submit name="edit_membership" value="{msgPool type=addButton}">
+{/render}
+<input type="hidden" name="nisnetgroupedit" value="1">
+
Added: branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/plugin.dsc
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/plugin.dsc (rev 0)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/netgroups/plugin.dsc 2013-01-20 17:39:39 UTC (rev 78794)
@@ -0,0 +1,7 @@
+[gosa-plugin]
+name = netgroups
+description = "nisNetgroup features"
+version = 0.1
+author = "Alejandro Escanero Blanco <aescanero at gmail.com>"
+maintainer = "Alejandro Escanero Blanco <aescanero at gmail.com>"
+homepage = https://oss.gonicus.de/labs/gosa-contrib/
More information about the debian-edu-commits
mailing list