ldapweb/webapp/config.py.dist

59 lines
1.4 KiB
Plaintext

# -*- coding: utf-8 -*-
import flask_wtf
import wtforms
ldap_url = 'ldap://ldap.hackerspace.pl'
dn_format = "uid=%s,ou=people,dc=hackerspace,dc=pl"
admin_dn = 'cn=ldapweb,ou=Services,dc=hackerspace,dc=pl'
admin_pw = 'changeme'
hackerspace_name = 'Warsaw Hackerspace'
readable_names = {
'givenname': u'Given Name',
'surname': u'Surname',
'loginshell': u'Shell',
'telephonenumber': 'Phone Number',
'mobiletelephonenumber': 'Mobile Number',
}
full_name = {
'cn': 'commonname',
'sn': 'surname',
'mobile': 'mobiletelephonenumber',
'l': 'locality',
}
can_add = set([
'telephonenumber',
'mobiletelephonenumber',
])
can_delete = can_add
can_modify = can_add
can = { 'add':can_add, 'mod':can_modify, 'del':can_delete }
admin_required = set()
perm_errors = {
'add': 'You cannot add this attribute!',
'mod': 'You cannot change this attribute!',
'del': 'You cannot delete this attribute!',
}
std_templates = {
'add': 'ops/add.html',
'mod': 'ops/mod.html',
'del': 'ops/del.html',
}
default_field = (wtforms.fields.StringField, {})
fields = { 'telephonenumber': (wtforms.fields.StringField, {'validators': [wtforms.validators.Regexp(r'[+0-9 ]+')]})}
kadmin_passwd = True
kadmin_principal = "kadmin/admin@HACKERSPACE.PL"
kadmin_keytab = "/app/mount/keytab"
kadmin_principal_map = "{}@HACKERSPACE.PL"
TOKEN_LENGTH = 32