aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/www/include/backend/ldap/base
diff options
context:
space:
mode:
authorM.Gergo2018-07-06 11:14:41 +0200
committerM.Gergo2018-07-06 11:14:41 +0200
commit43de9af71f7f4ca5731b94a06d688ae8412ba427 (patch)
tree54835de1dfcda504c02da261f0dc26885aed2e89 /mayor-orig/www/include/backend/ldap/base
parent50310b0e4513ee3fcce67351ae61e8fff851130e (diff)
downloadmayor-43de9af71f7f4ca5731b94a06d688ae8412ba427.tar.gz
mayor-43de9af71f7f4ca5731b94a06d688ae8412ba427.zip
2018/Feb/28 -i állapot hozzáadva, mint a módosítások kiindulási állapota
Diffstat (limited to 'mayor-orig/www/include/backend/ldap/base')
-rw-r--r--mayor-orig/www/include/backend/ldap/base/attrs.php120
-rw-r--r--mayor-orig/www/include/backend/ldap/base/attrs.php.orig175
-rw-r--r--mayor-orig/www/include/backend/ldap/base/str.php53
3 files changed, 348 insertions, 0 deletions
diff --git a/mayor-orig/www/include/backend/ldap/base/attrs.php b/mayor-orig/www/include/backend/ldap/base/attrs.php
new file mode 100644
index 00000000..bf86d0d2
--- /dev/null
+++ b/mayor-orig/www/include/backend/ldap/base/attrs.php
@@ -0,0 +1,120 @@
+<?php
+/*
+ Module: useradmin
+*/
+
+ if (file_exists('lang/'._LANG.'/backend/ldap/attrs.php')) {
+ require('lang/'._LANG.'/backend/ldap/attrs.php');
+ } elseif (file_exists('lang/'._DEFAULT_LANG.'/backend/ldap/attrs.php')) {
+ require('lang/'._DEFAULT_LANG.'/backend/ldap/attrs.php');
+ }
+
+######################################################
+# Alapértelmezett jogosultságok
+#
+# w - Írható/olvasható
+# r - olvasható
+# - - egyik sem
+#
+# Három karakter: admin, self, other jogai
+######################################################
+
+ define('_DEFAULT_LDAP_RIGHTS','wr-');
+
+######################################################
+# Az LDAP account attribútumok
+######################################################
+
+ global $ldapAccountAttrs;
+ $ldapAccountAttrs = array(
+ 'uid',
+ 'uidnumber',
+ 'gidnumber',
+ 'gecos',
+ 'cn',
+ 'studyid',
+ 'sn',
+ 'givenname',
+ 'mail',
+ 'telephonenumber',
+ 'mobile',
+ 'l',
+ 'street',
+ 'postaladdress',
+ 'postalcode',
+ 'homedirectory',
+ 'shadowlastchange',
+ 'shadowexpire',
+ 'shadowwarning',
+ 'shadowmin',
+ 'shadowmax',
+ 'shadowinactive',
+ );
+
+ global $ldapGroupAttrs;
+ $ldapGroupAttrs = array(
+ 'gidnumber',
+ 'cn',
+ 'description',
+ 'member',
+ 'memberuid'
+ );
+
+ global $accountAttrToLDAP;
+ $accountAttrToLDAP = array(
+ 'userAccount' => 'uid',
+ 'userCn' => 'cn',
+ 'mail' => 'mail',
+ 'studyId' => 'studyId',
+ 'shadowLastChange' => 'shadowLastChange',
+ 'shadowWarning' => 'shadowWarning',
+ 'shadowMin' => 'shadowMin',
+ 'shadowMax' => 'shadowMax',
+ 'shadowExpire' => 'shadowExpire',
+ 'shadowInactive' => 'shadowInactive',
+ );
+
+ global $groupAttrToLDAP;
+ $groupAttrToLDAP = array(
+ 'groupCn' => 'cn',
+ 'groupDesc' => 'description',
+ 'member' => 'member'
+ );
+
+ global $ldapAccountAttrDef;
+ $ldapAccountAttrDef = array(
+ 'dn' => array('desc' => _LDAPDN, 'type' => 'text', 'rights' => 'rrr'),
+ 'uid' => array('desc' => _LDAPUID, 'type' => 'text', 'rights' => 'rrr'),
+ 'uidnumber' => array('desc' => _LDAPUIDNUMBER, 'type' => 'int', 'rights' => 'w--'),
+ 'gidnumber' => array('desc' => _LDAPGIDNUMBER, 'type' => 'int', 'rights' => 'w--'),
+ 'gecos' => array('desc' => _LDAPGECOS, 'type' => 'text', 'rights' => 'w--'),
+ 'cn' => array('desc' => _LDAPCN, 'type' => 'text', 'rights' => 'wrr'),
+ 'studyid' => array('desc' => _LDAPSTUDYID, 'type' => 'int', 'rights' => 'wrr'),
+ 'sn' => array('desc' => _LDAPSN, 'type' => 'text'),
+ 'givenname' => array('desc' => _LDAPGIVENNAME, 'type' => 'text'),
+ 'mail' => array('desc' => _LDAPMAIL, 'type' => 'text', 'rights' => 'wwr'),
+ 'telephonenumber' => array('desc' => _LDAPTELEPHONENUMBER, 'type' => 'text', 'rights' => 'ww-'),
+ 'mobile' => array('desc' => _LDAPMOBILE, 'type' => 'text', 'rights' => 'ww-'),
+ 'l' => array('desc' => _LDAPL, 'type' => 'text'),
+ 'street' => array('desc' => _LDAPSTREET, 'type' => 'text'),
+ 'postaladdress' => array('desc' => _LDAPPOSTALADDRESS, 'type' => 'text'),
+ 'postalcode' => array('desc' => _LDAPPOSTALCODE, 'type' => 'text'),
+ 'homedirectory' => array('desc' => _LDAPHOMEDIRECTORY, 'type' => 'text'),
+ 'shadowlastchange' => array('desc' => _LDAPSHADOWLASTCHANGE, 'type' => 'text'),
+ 'shadowexpire' => array('desc' => _LDAPSHADOWEXPIRE, 'type' => 'text'),
+ 'shadowwarning' => array('desc' => _LDAPSHADOWWARNING, 'type' => 'text'),
+ 'shadowmin' => array('desc' => _LDAPSHADOWMIN, 'type' => 'text'),
+ 'shadowmax' => array('desc' => _LDAPSHADOWMAX, 'type' => 'text'),
+ 'shadowinactive' => array('desc' => _LDAPSHADOWINACTICE, 'type' => 'text'),
+ );
+
+ global $ldapGroupAttrDef;
+ $ldapGroupAttrDef = array(
+ 'cn' => array('desc' => _LDAPCN, 'type' => 'text','rights' => 'wrr'),
+ 'description' => array('desc' => _LDAPDESCRIPTION, 'type' => 'text'),
+ 'gidnumber' => array('desc' => _LDAPGIDNUMBER, 'type' => 'int','rights' => 'w--'),
+ 'memberuid' => array('desc' => _LDAPMEMBERUID, 'type' => 'select'),
+ 'member' => array('desc' => _LDAPMEMBER, 'type' => 'select'),
+ );
+
+?>
diff --git a/mayor-orig/www/include/backend/ldap/base/attrs.php.orig b/mayor-orig/www/include/backend/ldap/base/attrs.php.orig
new file mode 100644
index 00000000..658dfa1c
--- /dev/null
+++ b/mayor-orig/www/include/backend/ldap/base/attrs.php.orig
@@ -0,0 +1,175 @@
+<?php
+/*
+ Module: useradmin
+*/
+
+ if (file_exists('lang/'._LANG.'/backend/ldap/attrs.php')) {
+ require('lang/'._LANG.'/backend/ldap/attrs.php');
+ } elseif (file_exists('lang/'._DEFAULT_LANG.'/backend/ldap/attrs.php')) {
+ require('lang/'._DEFAULT_LANG.'/backend/ldap/attrs.php');
+ }
+
+######################################################
+# Alapértelmezett jogosultságok
+#
+# w - Írható/olvasható
+# r - olvasható
+# - - egyik sem
+#
+# Három karakter: admin, self, other jogai
+######################################################
+
+ define('_DEFAULT_LDAP_RIGHTS','wr-');
+
+######################################################
+# Az LDAP account attribútumok
+######################################################
+
+ global $ldapAccountAttrs;
+ $ldapAccountAttrs = array(
+ 'uid',
+ 'uidnumber',
+ 'gidnumber',
+ 'gecos',
+ 'cn',
+ 'sn',
+ 'givenname',
+ 'mail',
+ 'homepage',
+ 'url',
+ 'telephonenumber',
+ 'mobile',
+ 'year',
+ 'class',
+ 'l',
+ 'street',
+ 'postaladdress',
+ 'postalcode',
+ 'homedirectory',
+ 'owner',
+ 'leader',
+ 'description',
+ 'roomnumber',
+ 'registertimestamp',
+ 'primaryschoolomcode',
+ 'classtimestamp',
+ 'studentcardnumber',
+ 'studentcardtimestamp',
+ 'taxid',
+ 'birthtimestamp',
+ 'birthlocality',
+ 'registernumber',
+ 'diarynumber',
+ 'sex',
+ 'guardiancn',
+ 'mothercn',
+ 'localitytimestamp',
+ 'tajnumber',
+ 'member',
+ 'studentmember',
+ 'exemptmember',
+ 'examermember',
+ 'memberuid',
+ 'shadowlastchange',
+ 'shadowexpire',
+ 'shadowwarning',
+ 'shadowmin',
+ 'shadowmax',
+ 'shadowinactive',
+ 'parentpassword'
+ );
+
+ global $ldapGroupAttrs;
+ $ldapGroupAttrs = array(
+ 'gidnumber',
+ 'cn',
+ 'description',
+ 'owner',
+ 'member',
+ 'memberuid'
+ );
+
+ global $accountAttrToLDAP;
+ $accountAttrToLDAP = array(
+ 'userAccount' => 'uid',
+ 'userCn' => 'cn',
+ 'mail' => 'mail',
+ 'studyId' => 'studyId',
+ 'shadowLastChange' => 'shadowLastChange',
+ 'shadowWarning' => 'shadowWarning',
+ 'shadowMin' => 'shadowMin',
+ 'shadowMax' => 'shadowMax',
+ 'shadowExpire' => 'shadowExpire',
+ 'shadowInactive' => 'shadowInactive',
+ );
+
+ global $groupAttrToLDAP;
+ $groupAttrToLDAP = array(
+ 'groupId' => 'cn',
+ 'groupName' => 'description',
+// 'leader' => 'leader',
+ 'owner' => 'owner',
+ 'member' => 'member'
+ );
+
+ global $ldapAccountAttrDef;
+ $ldapAccountAttrDef = array(
+ 'dn' => array('desc' => _LDAPDN, 'type' => 'text','rights' => 'rrr'),
+ 'uid' => array('desc' => _LDAPUID, 'type' => 'text','rights' => 'rrr'),
+ 'uidnumber' => array('desc' => _LDAPUIDNUMBER, 'type' => 'int','rights' => 'w--'),
+ 'gidnumber' => array('desc' => _LDAPGIDNUMBER, 'type' => 'int','rights' => 'w--'),
+ 'gecos' => array('desc' => _LDAPGECOS, 'type' => 'text','rights' => 'w--'),
+ 'cn' => array('desc' => _LDAPCN, 'type' => 'text','rights' => 'wrr'),
+ 'sn' => array('desc' => _LDAPSN, 'type' => 'text'),
+ 'givenname' => array('desc' => _LDAPGIVENNAME, 'type' => 'text'),
+ 'mail' => array('desc' => _LDAPMAIL, 'type' => 'text','rights' => 'wwr'),
+ 'homepage' => array('desc' => _LDAPHOMEPAGE, 'type' => 'text','rights' => 'wwr'),
+ 'url' => array('desc' => _LDAPURL, 'type' => 'text'),
+ 'telephonenumber' => array('desc' => _LDAPTELEPHONENUMBER, 'type' => 'text','rights' => 'ww-'),
+ 'mobile' => array('desc' => _LDAPMOBILE, 'type' => 'text','rights' => 'ww-'),
+ 'year' => array('desc' => _LDAPYEAR, 'type' => 'int'),
+ 'class' => array('desc' => _LDAPCLASS, 'type' => 'text'),
+ 'l' => array('desc' => _LDAPL, 'type' => 'text'),
+ 'street' => array('desc' => _LDAPSTREET, 'type' => 'text'),
+ 'postaladdress' => array('desc' => _LDAPPOSTALADDRESS, 'type' => 'text'),
+ 'postalcode' => array('desc' => _LDAPPOSTALCODE, 'type' => 'text'),
+ 'homedirectory' => array('desc' => _LDAPHOMEDIRECTORY, 'type' => 'text'),
+ 'roomnumber' => array('desc' => _LDAPROOMNUMBER, 'type' => 'int'),
+ 'registertimestamp' => array('desc' => _LDAPREGISTERTIMESTAMP, 'type' => 'timestamp'),
+ 'primaryschoolomcode' => array('desc' => _LDAPPRIMARYSCHOOLOMCODE, 'type' => 'text'),
+ 'classtimestamp' => array('desc' => _LDAPCLASSTIMESTAMP, 'type' => 'timestamp'),
+ 'studentcardnumber' => array('desc' => _LDAPSTUDENTCARDNUMBER, 'type' => 'text'),
+ 'studentcardtimestamp' => array('desc' => _LDAPSTUDENTCARDTIMESTAMP, 'type' => 'timestamp'),
+ 'taxid' => array('desc' => _LDAPTAXID, 'type' => 'text'),
+ 'birthtimestamp' => array('desc' => _LDAPBIRTHTIMESTAMP, 'type' => 'timestamp'),
+ 'birthlocality' => array('desc' => _LDAPBIRTHLOCALITY, 'type' => 'text'),
+ 'registernumber' => array('desc' => _LDAPREGISTERNUMBER, 'type' => 'text'),
+ 'diarynumber' => array('desc' => _LDAPDIARYNUMBER, 'type' => 'text'),
+ 'sex' => array('desc' => _LDAPSEX, 'type' => 'radio', 'options' => array(_FIU, _LANY)),
+ 'guardiancn' => array('desc' => _LDAPGUARDIANCN, 'type' => 'text'),
+ 'mothercn' => array('desc' => _LDAPMOTHERCN, 'type' => 'text'),
+ 'localitytimestamp' => array('desc' => _LDAPLOCALITYTIMESTAMP, 'type' => 'timestamp'),
+ 'tajnumber' => array('desc' => _LDAPTAJNUMBER, 'type' => 'text'),
+ 'shadowlastchange' => array('desc' => _LDAPSHADOWLASTCHANGE, 'type' => 'text'),
+ 'shadowexpire' => array('desc' => _LDAPSHADOWEXPIRE, 'type' => 'text'),
+ 'shadowwarning' => array('desc' => _LDAPSHADOWWARNING, 'type' => 'text'),
+ 'shadowmin' => array('desc' => _LDAPSHADOWMIN, 'type' => 'text'),
+ 'shadowmax' => array('desc' => _LDAPSHADOWMAX, 'type' => 'text'),
+ 'shadowinactive' => array('desc' => _LDAPSHADOWINACTICE, 'type' => 'text'),
+ );
+
+ global $ldapGroupAttrDef;
+ $ldapGroupAttrDef = array(
+ 'cn' => array('desc' => _LDAPCN, 'type' => 'text','rights' => 'wrr'),
+ 'description' => array('desc' => _LDAPDESCRIPTION, 'type' => 'text'),
+ 'gidnumber' => array('desc' => _LDAPGIDNUMBER, 'type' => 'int','rights' => 'w--'),
+ 'memberuid' => array('desc' => _LDAPMEMBERUID, 'type' => 'select'),
+ 'member' => array('desc' => _LDAPMEMBER, 'type' => 'select'),
+ 'owner' => array('desc' => _LDAPOWNER, 'type' => 'select'),
+// 'studentmember' => array('desc' => _LDAPSTUDENTMEMBER, 'type' => 'text'),
+// 'exemptmember' => array('desc' => _LDAPEXEMPTMEMBER, 'type' => 'text'),
+// 'examermember' => array('desc' => _LDAPEXAMERMEMBER, 'type' => 'text'),
+// 'leader' => array('desc' => _LDAPLEADER, 'type' => 'text'),
+ );
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/include/backend/ldap/base/str.php b/mayor-orig/www/include/backend/ldap/base/str.php
new file mode 100644
index 00000000..2ef3ad1c
--- /dev/null
+++ b/mayor-orig/www/include/backend/ldap/base/str.php
@@ -0,0 +1,53 @@
+<?php
+/*
+ Module: useradmin
+
+ function date2timestamp($date)
+ function timestamp2date($stamp)
+ !! -- function ldap_cn_cmp($a,$b) -- !! Kell ez?
+ !! -- function tanar_cn_cmp($a,$b) -- !! Használjuk ezt?
+
+ // - fuggoseg - // require_once('include/share/ldap/attrs.php');
+
+*/
+
+// -------------------------------------
+// Date2Timestamp
+// -------------------------------------
+
+ function date2timestamp($date) {
+ $date = str_replace('-','',$date);
+ $date = str_replace('.','',$date).'010101Z';
+ if (strlen($date) == 15) return $date;
+ else return '';
+ }
+
+// -------------------------------------
+// Timestamp2Date
+// -------------------------------------
+
+ function timestamp2date($stamp) {
+ $date = substr($stamp,0,4).'-'.substr($stamp,4,2).'-'.substr($stamp,6,2);
+ if (strlen($date) == 10) return $date;
+ else return '';
+ }
+
+/*
+// ---------------------------------------------------------------------------
+// LDAP eredmény elemeinek összehasonlítása cn-alapján (Már latin2-es kódolású!!!)
+// ---------------------------------------------------------------------------
+
+ function ldap_cn_cmp($a,$b) {
+ return str_cmp($a['cn'][0],$b['cn'][0]);
+ }
+
+// ---------------------------------------------------------------------------
+// $TANAROK tömb rendezéséhez (include/naplo/helyettesít.php) (Már latin2-es kódolású!!!)
+// ---------------------------------------------------------------------------
+
+ function tanar_cn_cmp($a,$b) {
+ return str_cmp($a['cn'],$b['cn']);
+ }
+*/
+
+?>