Debian Codegraph @

lib/modules/pykotaUserStructural.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 PyKota user accounts.
24 * This module is used when the structural object class pykotaObject should be used.
25 *
26 * @package modules
27 * @author Roland Gruber
28 */
29
30 /** include parent class */
31 include_once(__DIR__ . "/pykotaUser.inc");
32
33 /**
34 * Manages PyKota user accounts.
35 *
36 * @package modules
37 */
38 class pykotaUserStructural extends pykotaUser {
39
40 /**
41 * {@inheritDoc}
42 */
43 public function isStructural(): bool {
44 return true;
45 }
46
47 /**
48 * {@inheritDoc}
49 */
50 public function get_metaData(): array {
51 $return = parent::get_metaData();
52 // module dependencies
53 $return['dependencies'] = ['depends' => [], 'conflicts' => ['pykotaUser']];
54 // additional object class and attribute
55 $return['objectClasses'][] = 'pykotaObject';
56 $return['attributes'][] = 'cn';
57 // RDN attribute
58 $return["RDN"] = ["cn" => "normal", 'uid' => 'low'];
59 return $return;
60 }
61
62 }