Debian Codegraph @

lib/modules/windowsPosixGroup.inc

raw
1 <?php
2 /*
3
4 This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
5 Copyright (C) 2013 - 2024 Roland Gruber
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22 /**
23 * Manages Unix groups in Windows LDAP schema.
24 *
25 * @package modules
26 * @author Roland Gruber
27 */
28
29 /** include parent class */
30 include_once(__DIR__ . "/posixGroup.inc");
31
32 /**
33 * Manages Unix groups in Windows LDAP schema.
34 *
35 * @package modules
36 */
37 class windowsPosixGroup extends posixGroup {
38
39 /**
40 * Creates a new windowsPosixGroup object.
41 *
42 * @param string $scope account type (user, group, host)
43 */
44 public function __construct($scope) {
45 // different password attribute name
46 $this->passwordAttrName = 'unixUserPassword';
47 // make optional
48 $this->autoAddObjectClasses = false;
49 // call parent constructor
50 parent::__construct($scope);
51 }
52
53 /**
54 * {@inheritDoc}
55 */
56 public function get_metaData(): array {
57 $return = parent::get_metaData();
58 // module dependencies
59 $return['dependencies'] = ['depends' => [], 'conflicts' => ['posixGroup']];
60 // this is no base module (in contrast to parent class)
61 $return["is_base"] = false;
62 // no RDN attribute setting
63 $return["RDN"] = [];
64 return $return;
65 }
66
67 /**
68 * {@inheritDoc}
69 */
70 public function getButtonStatus(): string {
71 return "enabled";
72 }
73
74 /**
75 * {@inheritDoc}
76 */
77 public function module_complete(): bool {
78 return true;
79 }
80
81 /**
82 * {@inheritdoc}
83 */
84 protected function manageCnAndDescription($modules) {
85 // do not manage cn and description (managed by windowsGroup)
86 return false;
87 }
88
89 }