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"""
3web2ldap plugin classes for PGP key server
4"""
5
6import re
7from typing import Dict
8
9from ..schema.syntaxes import (
10 DynamicDNSelectList,
11 MultilineText,
12 SelectList,
13 syntax_registry,
14)
15
16
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
28syntax_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
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
51syntax_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
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
69syntax_registry.reg_at(
70 CheckPassword.oid, [
71 '2.16.840.1.113678.2.2.2.2.29' # CheckPassword
72 ]
73)
74
75
77 oid: str = 'MailServer-oid'
78 desc: str = 'DN of mail server entry'
79 ldap_url = 'ldap:///?displayname?sub?(objectClass=dominoServer)'
80
81syntax_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
89syntax_registry.reg_syntaxes(__name__)