Bug#839860: gosa-plugin-netgroups: fails to add a system to a netgroup

2016-10-06 Thread Wolfgang Schweer
On Wed, Oct 05, 2016 at 09:07:17PM +0200, Wolfgang Schweer wrote:
> GOsa² throws an error about an undefined method 'plugin:plugin'; this is 
> most probably due to the PHP 7.0 transition (the constructor issue is 
> hidden by the methods issue).
 
These changes seem to fix it:

--- gosa-plugin-netgroups-0.1~svn652/admin/netgroups/class_netgroup.inc 
2012-07-27 09:59:17.0 +0200
+++ plugins/admin/netgroups/class_netgroup.inc  2016-10-06 11:58:55.0 
+0200
@@ -57,9 +57,9 @@
 
/* Constructor which load object attributes aso.
 * */
-function netgroup(&$config, $dn= NULL) {
+function __construct(&$config, $dn= NULL) {
 
-plugin::plugin($config, $dn);
+plugin::__construct($config, $dn);
$this->objectInfo = array("triple" => array(), "groups" => 
array());
 $this->orig_dn = $dn;
 $this->orig_cn = $this->cn;



--- 
gosa-plugin-netgroups-0.1~svn652/admin/systems/netgroups/class_netgroupSystem.inc
   2016-10-06 13:13:03.0 +0200
+++ plugins/admin/systems/netgroups/class_netgroupSystem.inc2016-10-06 
12:03:50.0 +0200
@@ -48,12 +48,12 @@
 
/* Constructor: Prepare values, lists, ...
 * */
-   function netgroupSystem(&$config, $dn= NULL) 
+   function __construct(&$config, $dn= NULL) 
{
$this->config = $config;
 
/* Load bases attributes */
-   plugin::plugin($config, $dn);
+   plugin::__construct($config, $dn);
 
/* Setting cn to default */
if (isset($this->attrs['cn'][0])) {


Please check.

Wolfgang


signature.asc
Description: Digital signature


Bug#839860: gosa-plugin-netgroups: fails to add a system to a netgroup

2016-10-05 Thread Wolfgang Schweer
Package: gosa-plugin-netgroups
Version: 0.1~svn652-3 

Severity: important

While testing Debian Edu stretch I successfully installed a workstation 
via PXE but was unable to add this system as a workstation-host to LDAP 
using GOsa².

GOsa² throws an error about an undefined method 'plugin:plugin'; this is 
most probably due to the PHP 7.0 transition (the constructor issue is 
hidden by the methods issue).

Fatal error:  Uncaught Error: Call to undefined method 
plugin::plugin() in 
/usr/share/gosa/plugins/admin/systems/netgroups/class_netgroupSystem.inc:56
Stack
 trace:
#0 /usr/share/gosa/plugins/admin/systems/goto/tabs_workstation.inc(31): 
netgroupSystem-netgroupSystem(Object(config), 'cn=ws9.intern,o...', 
Object(workgeneric), Object(worktabs))
#1 /usr/share/gosa/include/class_management.inc(747): 
worktabs-__construct(Object(config), Array, 'cn=ws9.intern,o...', 
'workstation')
#2 
/usr/share/gosa/plugins/admin/systems/class_systemManagement.inc(736): 
management-editEntry('edit', Array, Array, 'worktabs', 'WORKTABS', 
'workstation')
#3 /usr/share/gosa/include/class_management.inc(465): 
systemManagement-editEntry('edit', Array, Array)
#4 /usr/share/gosa/include/class_management.inc(173): 
management-handleActions(Array)
#5 /usr/share/gosa/plugins/admin/systems/main.inc(44): 
management-execute()
#6 /usr/share/gosa/html/main.php(407): require('/usr/share/gosa...')
#7 {main}
  thrown in 
/usr/share/gosa/plugins/admin/systems/netgroups/class_netgroupSystem.inc on 
line 56


After this change to class_netgroupSystem.inc:

<   function netgroupSystem(&$config, $dn= NULL) 
---
>   function netgroupSystem_(&$config, $dn= NULL) 

the system details show up in the gui.

But, when trying to add the system to the workstation-hosts netgroup the 
next error is thrown:

Fatal error:  Uncaught Error: Call to a member function setAcl() 
on null in 
/usr/share/gosa/plugins/admin/systems/netgroups/class_netgroupSystem.inc:163
Stack
 trace:
#0 /usr/share/gosa/include/class_tabs.inc(166): 
netgroupSystem-execute()
#1 /usr/share/gosa/include/class_management.inc(189): tabs-execute()
#2 /usr/share/gosa/plugins/admin/systems/main.inc(44): 
management-execute()
#3 /usr/share/gosa/html/main.php(407): require('/usr/share/gosa...')
#4 {main}
  thrown in 
/usr/share/gosa/plugins/admin/systems/netgroups/class_netgroupSystem.inc on 
line 163


If a system is added manually using an LDAP editor, login succeeds on a 
workstation.

Wolfgang


signature.asc
Description: Digital signature