Add hackerspace name config option
Also move config.py to config.py.dist for distribution purposes :)
This commit is contained in:
parent
0b9e737dba
commit
a097e314a0
4 changed files with 19 additions and 11 deletions
10
krb5.conf
10
krb5.conf
|
@ -28,12 +28,14 @@
|
|||
admin_server = kerberos.mit.edu
|
||||
default_domain = mit.edu
|
||||
}
|
||||
TOG.IE = {
|
||||
kdc = duckula.tog.ie
|
||||
admin_server = duckula.tog.ie
|
||||
sasl-realm = TOG.IE
|
||||
HACKERSPACE.PL = {
|
||||
admin_server = hackerspace.pl
|
||||
kdc = hackerspace.pl
|
||||
default_domain = hackerspace.pl
|
||||
sasl-realm = HACKERSPACE.PL
|
||||
}
|
||||
|
||||
|
||||
[domain_realm]
|
||||
.mit.edu = ATHENA.MIT.EDU
|
||||
mit.edu = ATHENA.MIT.EDU
|
||||
|
|
|
@ -19,6 +19,10 @@ from webapp import validation, pools, config
|
|||
def inject_readable():
|
||||
return dict(readable_names=config.readable_names)
|
||||
|
||||
@app.context_processor
|
||||
def inject_hackerspace_name():
|
||||
return dict(hackerspace_name=config.hackerspace_name)
|
||||
|
||||
@app.template_filter('first')
|
||||
def ldap_first(v):
|
||||
return v and v[0]
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import flask_wtf
|
||||
import wtforms
|
||||
ldap_url = 'ldap://ldap.tog.ie'
|
||||
dn_format = "uid=%s,ou=people,dc=tog,dc=ie"
|
||||
ldap_url = 'ldap://ldap.hackerspace.pl'
|
||||
dn_format = "uid=%s,ou=people,dc=hackerspace,dc=pl"
|
||||
|
||||
admin_dn = 'cn=ldapweb,ou=Services,dc=tog,dc=ie'
|
||||
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',
|
||||
|
@ -49,8 +51,8 @@ default_field = (wtforms.fields.StringField, {})
|
|||
fields = { 'telephonenumber': (wtforms.fields.StringField, {'validators': [wtforms.validators.Regexp(r'[+0-9 ]+')]})}
|
||||
|
||||
kadmin_passwd = True
|
||||
kadmin_principal = "ldapweb/admin@TOG.IE"
|
||||
kadmin_principal = "kadmin/admin@HACKERSPACE.PL"
|
||||
kadmin_keytab = "/app/mount/keytab"
|
||||
kadmin_principal_map = "{}@TOG.IE"
|
||||
kadmin_principal_map = "{}@HACKERSPACE.PL"
|
||||
|
||||
TOKEN_LENGTH = 32
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}Hackerspace Membership Manager{% endblock %}</title>
|
||||
<title>{% block title %}{{ hackerspace_name }} Membership Manager{% endblock %}</title>
|
||||
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/static/css/bootstrap-theme.min.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
|
@ -30,7 +30,7 @@ body {
|
|||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Tog Membership Manager</a>
|
||||
<a class="navbar-brand" href="#">{{ hackerspace_name }} Membership Manager</a>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
|
|
Loading…
Add table
Reference in a new issue