forked from public/pyceo
25 lines
731 B
Python
25 lines
731 B
Python
from zope.interface import implementer
|
|
|
|
from ceo_common.interfaces import IConfig
|
|
|
|
|
|
@implementer(IConfig)
|
|
class Config:
|
|
# TODO: read from a config file
|
|
_domain = 'csclub.internal'
|
|
_ldap_base = ','.join(['dc=' + dc for dc in _domain.split('.')])
|
|
_config = {
|
|
'ldap_admin_principal': 'ceod/admin',
|
|
'ldap_server_url': 'ldap://ldap-master.' + _domain,
|
|
'ldap_users_base': 'ou=People,' + _ldap_base,
|
|
'ldap_groups_base': 'ou=Group,' + _ldap_base,
|
|
'ldap_sasl_realm': _domain.upper(),
|
|
'member_min_id': 20001,
|
|
'member_max_id': 29999,
|
|
'club_min_id': 30001,
|
|
'club_max_id': 39999,
|
|
}
|
|
|
|
def get(self, key: str) -> str:
|
|
return self._config[key]
|