web2ldap
1.7.7
About:
web2ldap
is a full-featured web-based LDAPv3 client.
Fossies
Dox
:
web2ldap-1.7.7.tar.gz
("unofficial" and yet experimental doxygen-generated source code documentation)
lotusdomino.py
Go to the documentation of this file.
1
# -*- coding: ascii -*-
2
"""
3
web2ldap plugin classes for PGP key server
4
"""
5
6
import
re
7
from
typing
import
Dict
8
9
from
..schema.syntaxes
import
(
10
DynamicDNSelectList,
11
MultilineText,
12
SelectList,
13
syntax_registry,
14
)
15
16
17
class
YesNoIntegerFlag
(
SelectList
):
18
"""
19
Plugin
class
for flag attribute with value
"yes"
or
"no"
20
"""
21
oid: str = 'YesNoIntegerFlag-oid'
22
desc: str =
'0 means no, 1 means yes'
23
attr_value_dict: Dict[str, str] = {
24
'0'
:
'no'
,
25
'1'
:
'yes'
,
26
}
27
28
syntax_registry.reg_at(
29
YesNoIntegerFlag.oid, [
30
'2.16.840.1.113678.2.2.2.2.4'
,
# AvailableForDirSync
31
'2.16.840.1.113678.2.2.2.2.18'
,
# EncryptIncomingMail
32
]
33
)
34
35
36
class
DominoCertificate
(
MultilineText
):
37
oid: str =
'DominoCertificate-oid'
38
desc: str =
'Domino certificate'
39
pattern = re.compile(
'^([A-Z0-9]{8} [A-Z0-9]{8} [A-Z0-9]{8} [A-Z0-9]{8}[\x00]?)+[A-Z0-9 ]*$'
)
40
lineSep = b
'\x00'
41
mime_type =
'text/plain'
42
cols = 36
43
44
def
display
(self, vidx, links) -> str:
45
lines = [
46
self.
_app
.form.s2d(l)
47
for
l
in
self.
_split_lines
(self.
av_u
)
48
]
49
return
'<code>%s</code>'
%
'<br>'
.join(lines)
50
51
syntax_registry.reg_at(
52
DominoCertificate.oid, [
53
'2.16.840.1.113678.2.2.2.2.22'
,
# dominoCertificate
54
'2.16.840.1.113678.2.2.2.2.45'
,
# Certificate-NoEnc
55
'inetpublickey'
,
56
]
57
)
58
59
60
class
CheckPassword
(
SelectList
):
61
oid: str =
'CheckPassword-oid'
62
desc: str =
''
63
attr_value_dict: Dict[str, str] = {
64
'0'
:
'Do not check password'
,
65
'1'
:
'Check password'
,
66
'2'
:
'ID is locked'
,
67
}
68
69
syntax_registry.reg_at(
70
CheckPassword.oid, [
71
'2.16.840.1.113678.2.2.2.2.29'
# CheckPassword
72
]
73
)
74
75
76
class
MailServer
(
DynamicDNSelectList
):
77
oid: str =
'MailServer-oid'
78
desc: str =
'DN of mail server entry'
79
ldap_url =
'ldap:///?displayname?sub?(objectClass=dominoServer)'
80
81
syntax_registry.reg_at(
82
MailServer.oid, [
83
'2.16.840.1.113678.2.2.2.2.12'
,
# MailServer
84
]
85
)
86
87
88
# Register all syntax classes in this module
89
syntax_registry.reg_syntaxes(__name__)
web2ldap.app.plugins.lotusdomino.CheckPassword
Definition:
lotusdomino.py:60
web2ldap.app.plugins.lotusdomino.DominoCertificate
Definition:
lotusdomino.py:36
web2ldap.app.plugins.lotusdomino.DominoCertificate.display
str display(self, vidx, links)
Definition:
lotusdomino.py:44
web2ldap.app.plugins.lotusdomino.MailServer
Definition:
lotusdomino.py:76
web2ldap.app.plugins.lotusdomino.YesNoIntegerFlag
Definition:
lotusdomino.py:17
web2ldap.app.schema.syntaxes.DynamicDNSelectList
Definition:
syntaxes.py:2115
web2ldap.app.schema.syntaxes.LDAPSyntax._app
_app
Definition:
syntaxes.py:306
web2ldap.app.schema.syntaxes.LDAPSyntax.av_u
def av_u(self)
Definition:
syntaxes.py:316
web2ldap.app.schema.syntaxes.MultilineText
Definition:
syntaxes.py:1395
web2ldap.app.schema.syntaxes.MultilineText._split_lines
def _split_lines(self, value)
Definition:
syntaxes.py:1408
web2ldap.app.schema.syntaxes.SelectList
Definition:
syntaxes.py:1802
web2ldap
app
plugins
lotusdomino.py
Generated by
1.9.4