Commit Graph

2244 Commits

Author SHA1 Message Date
Jérôme Schneider e7feeebc04 debian-wheezy: rename collected-static to collectstatic
Needed by debian_config_common.py
2015-04-30 11:46:25 +02:00
Jérôme Schneider 695dbd9682 debian authentic2-multitenant: generate secret key 2015-04-30 11:41:02 +02:00
Benjamin Dauvergne 84848778c6 debian-wheezy: import multitenant/debian_config.py from master to use hobo's debian_config_common.py 2015-04-30 10:32:00 +02:00
Benjamin Dauvergne 3237a93d40 registration_backend/forms: if username is part of the registration, check its uniqueness 2015-04-30 10:31:30 +02:00
Benjamin Dauvergne 0aa54d1af7 registration_backend/forms: do not overwrite the username if it's a field of the form 2015-04-30 10:29:53 +02:00
Benjamin Dauvergne 246843f958 attribute_kinds: since Django 1.7 allow_lazy() seems to need an explicit return value type 2015-04-29 10:14:50 +02:00
Jérôme Schneider d0a691f5b6 use python-request instead of pycurl or M2Crypto (#6540) 2015-04-29 10:14:43 +02:00
Benjamin Dauvergne 0bea1f086a manager: update french translation (fixes #7011)
Conflicts:
	src/authentic2/manager/locale/fr/LC_MESSAGES/django.po
2015-04-24 18:02:13 +02:00
Benjamin Dauvergne 3a03f57732 manager: improve confirmation dialog message when removing an user from a role (#7011) 2015-04-24 17:59:05 +02:00
Benjamin Dauvergne d20a7cc1bc Work around regression with model forms when a non-model form is passed to modelform_factory by the django.contrib.admin (refs #6766) 2015-04-24 17:53:57 +02:00
Jérôme Schneider bd6c954064 debian-wheezy: add pydist-overrides 2015-04-23 13:16:58 +02:00
Benjamin Dauvergne 06fe6bf97b accounts: use Django naming for password related views, keep previous name for retrocompatibility with already deployed themes (#6851)
Django 1.7 now use accounting view names directly in its code, they also
changed the signature of the password_change_done view regexp (it
expects a uidb64 argument instead of uidb36). To minimize difference
with expected view names but to also keep retrocompatibility view names
were renamed with the Django names and old declarations were kept but
declared after the official ones such that they will never match a
request but they can still be used for reversing view names.
2015-04-23 11:23:31 +02:00
Benjamin Dauvergne 5232d170ab views: in logout() show the intermediate page when next_url is not the default next URL (fixes #7031) 2015-04-23 11:21:57 +02:00
Benjamin Dauvergne d550f427d4 manager: fix permission names in view restrictions (fixes #7030) 2015-04-23 11:11:28 +02:00
Benjamin Dauvergne 1f06502324 Add --noinput when calling migrate 2015-04-17 14:31:50 +02:00
Frédéric Péters 3504b3e597 adapt debian_config.py to match new TENANT_SETTINGS_LOADERS name (#6836) 2015-04-17 14:25:53 +02:00
Benjamin Dauvergne 538ea47f6b forms.py: change NextUrlFormMixin's field "next_url" to be optional (fixes #6917)
If not optional and no next_url parameter is given, an error is raised
and the user can never complete the form.
2015-04-17 14:18:49 +02:00
Benjamin Dauvergne 10e38ad443 validators: verify that email's domain idna encoding succeed before validating it (#6800) 2015-04-17 14:04:47 +02:00
Benjamin Dauvergne 9fc5a61d4e manager: fix logout on users and roles pages (fixes #6954)
The supper call in RolesMixin was made on the wrong class.
2015-04-17 14:04:10 +02:00
Benjamin Dauvergne 181025b13b admin: remove group member editing through the group change form (fixes #6951) 2015-04-17 14:03:50 +02:00
Benjamin Dauvergne 83d8390623 registration_backend/forms.py: fix passing of the HTML template to the send_mail function 2015-04-17 14:03:00 +02:00
Benjamin Dauvergne c8e10def06 Change default logging configuration (fixes #6922)
We only configure the root logger and 'django.db'. If DEBUG is True we
see the root logger to DEBUG. We do not use Django default logging
configuration by bypassing it using LOGGING_CONFIG = None[1].

* django_select2 logger is set to warning as the INFO level emit
  uninteresting messages
* django.db logger is set to INFO, to prevent getting SQL queries when
  DEBUG is True. To get the SQL queries set DEBUG_DB to True in your
  settings.
* Set a default logging configuration for the multitenant packaging
* Add a RequestContextFilter logging filterto provide, usename, ip
  and a request ID to the formatter.
* Use the new filter in default, debian and debian-multitenant settings.
* Add a new setting DEBUG_DB for activating logging of SQL queries.

[1]: https://www.caktusgroup.com/blog/2015/01/27/Django-Logging-Configuration-logging_config-default-settings-logger/
2015-04-17 14:02:34 +02:00
Benjamin Dauvergne 59f536e998 Set a request id on all requests (#6922)
The request id is extracted from an header set using the
REQUEST_ID_HEADER setting or generated using the default Python random
number generator.
2015-04-17 14:02:12 +02:00
Benjamin Dauvergne 4f3359f075 Add a XForwardedForMiddleware middleware (#6922)
It allows authentic to automatically get the real ip when behind
Gunicorn+nginx.
2015-04-17 14:02:04 +02:00
Benjamin Dauvergne e867d7fba7 idp/saml/backend.py: refactor logging 2015-04-17 14:00:14 +02:00
Benjamin Dauvergne 7289e486cd views.py: log a message on logout 2015-04-17 13:59:31 +02:00
Benjamin Dauvergne 3ce5595074 utils.py: log a message on login 2015-04-17 13:59:26 +02:00
Benjamin Dauvergne 6491033c80 saml: use get_or_create() in save_key_values (fixes #6883)
With a simple Model.save() the second save in case of replay fails
because the created is updated to the NULL value. It seem that
initialization of DateTime field is ignored when Django detects that a
save is an UPDATE and not an INSERT.
2015-04-17 13:59:08 +02:00
Benjamin Dauvergne 5d6723ad00 attribute_aggregator: fix oid for eduOrg attributes 2015-04-17 13:56:06 +02:00
Benjamin Dauvergne 3b604e9aa2 Fix typo in get_sp_options_policy_default() (fixes #6858) 2015-04-17 12:16:44 +02:00
Benjamin Dauvergne 45b82c0018 Add debian directory from 2.1.13 release 2015-04-17 12:16:23 +02:00
Benjamin Dauvergne dc3e09d9ea Prepare release 2.1.13 2015-03-23 17:25:46 +01:00
Benjamin Dauvergne 2d8fbdcd53 ldap: update block saved in LDAP users objects with default values (#6784)
If a session is older thant the last upgrade then it can happend that
user.block miss keys which are now mandatory and have a default value.
To be sure those keys exist we update the block with default value each
time it is used, i.e. in LDAPUser.get_connection().
2015-03-23 17:13:14 +01:00
Benjamin Dauvergne 22d382e27a Optimize queries in SamlBackend.service_list()
Homepage was making too many queries when there are a lot of service
providers, for example when the IdP is part of a federation.
2015-03-23 17:12:59 +01:00
Benjamin Dauvergne 96ab51e357 In get_sp_options_policy() and get_idp_options_policy() cache query for default and all queries 2015-03-23 17:12:59 +01:00
Benjamin Dauvergne d69eec9e20 Add decorator to cache function results in request
It should be used to cache queryset result that can be reused during the
same request.
2015-03-23 17:12:59 +01:00
Benjamin Dauvergne 9b23610a01 Fix missing distribution of locales and tempaltes for authentic2_idp_cas 2015-03-13 16:10:11 +01:00
Benjamin Dauvergne e878ad3c14 Prepare release 2.1.12 2015-03-13 16:08:01 +01:00
Benjamin Dauvergne dba9e5e3ba Generate version only from git tags 2015-03-13 16:08:01 +01:00
Benjamin Dauvergne e30917ed40 Reorder migrations of the saml application 2015-03-13 15:40:06 +01:00
Benjamin Dauvergne dc70e960e1 ldap: fix logging call 2015-03-13 14:15:57 +01:00
Benjamin Dauvergne 7a9423e6ed Do not pass homepage url through settings, use variables set in the template context by a template context processor (refs #6690) 2015-03-13 12:06:27 +01:00
Serghei Mihai f41a12ba9a login label updated when email authentication enabled (6669) 2015-03-12 11:21:11 +01:00
Benjamin Dauvergne 6b9606a2c0 Support variable MANAGER_HOMEPAGE_URL and MANAGER_HOMEPAGE_TILE for the first element of the manager breadcrumb (fixes #6690)
The goal is to ease integration of A2 manager in an administration
portal by permitting global navigation between sites.
2015-03-11 15:10:02 +01:00
Benjamin Dauvergne c38ee5e7c6 Add created filed to SamlKeyValue to permit expiration of stored values (fixes #5639)
This commit also set the default manager to be the ExpireManager.
2015-03-11 15:08:42 +01:00
Benjamin Dauvergne d5675f2540 Add an ExpireManager to share common code around expiration of models (refs #5639) 2015-03-11 15:08:42 +01:00
Benjamin Dauvergne 1d6a4d9e15 Remove LibertyFederation model (refs #5639)
The model is unused since commit df00c9d6c8.
2015-03-11 15:08:42 +01:00
Benjamin Dauvergne 4df0d05f4c Add missing newline in translations that broke msgfmt 2015-03-10 14:57:11 +01:00
Benjamin Dauvergne 6f4c045408 Deactivate custom csrf view for tests 2015-03-10 14:53:13 +01:00
Frédéric Péters 5907b85caf update French translation 2015-03-10 13:23:47 +01:00