Marcin Kuzminski
08000af552
auth: made the message about not-active user consisten with token plugin
2016-07-13 12:27:04 +02:00
Marcin Kuzminski
ab6750c9a7
auth-token: allow other authentication types to use auth-token.
...
Fixes #4070
2016-07-12 19:56:48 +02:00
Martin Bornhold
0641c0e2d0
authn: Generate the form default values manually.
...
When using colander.flatten(data) it adds colander.null for each
missing form field. But this is not correct. What we want here is
a dict wich contains only the keys/values from request.params that
match a form field.
2016-06-28 16:28:18 +02:00
Martin Bornhold
54f29c46ab
authn: Only lookup settings from DB if they are really used.
...
When computing the form defaults only query the DB if we
need the value from DB.
2016-06-28 12:07:10 +02:00
Martin Bornhold
381973ba40
authn: Remove usage of colander.serialize to generate form defaults.
2016-06-28 11:56:27 +02:00
Johannes Bornhold
cf906eafe6
authn: Use type() instead of __class__ attribute.
2016-06-21 08:09:55 +02:00
Johannes Bornhold
24e2b4a137
authn: Test authentication plugin settings POST views.
2016-06-20 17:27:31 +02:00
Johannes Bornhold
b5079c9ba9
authn: Fix priority of default values if some values are missing during POST
...
Normally this affects only the test suite but doesn't hurt to be correct :)
2016-06-20 17:27:04 +02:00
Johannes Bornhold
a1b5f9d602
authn: Allow to pass in a default value if setting is not available in DB.
2016-06-20 17:25:35 +02:00
Martin Bornhold
30ce19fa4f
authn: Unit tests to simply get the authentication settings pages.
...
Checks for enabled (retcode=200) and disabled (retcode=404) plugins.
2016-06-20 15:48:23 +02:00
Martin Bornhold
94d448b77c
authn: Create context managers to enable/disable an authentication plugin in DB.
2016-06-20 15:46:35 +02:00
Martin Bornhold
df46a4458a
authn: Add fixture that provides authentication plugin instances.
2016-06-20 15:45:58 +02:00
Johannes Bornhold
825e26db6f
authn: Don't use setting value to compute the setting type.
2016-06-20 11:52:24 +02:00
Johannes Bornhold
4e9923b5ae
auth: Implement __str__ on plugin base class
...
This way some error messages will look nicer, since they are based on the
__str__ of the plugin instance. Using the plugin_id will give the user (and us
in the support case) the exact pointer to the affected plugins.
2016-06-16 09:11:45 +02:00
Martin Bornhold
3bd01810b3
permissions: Fix permissions for authentication plugin settings view.
2016-06-14 12:30:42 +02:00
Johannes Bornhold
997191d4d4
authn: Remove doubled colon in plugin ID generation.
2016-06-06 16:15:38 +02:00
Johannes Bornhold
8ccbc6ad72
authn: Bugfix, use the fallback plugin setting in log message.
2016-06-06 16:14:37 +02:00
Johannes Bornhold
f8e4aa4dcc
authn: Small refactoring of plugin discovery.
2016-06-06 13:26:37 +02:00
Johannes Bornhold
5d2d8f4267
authn: Make the legacy plugin import more robust if something fails during import.
2016-06-06 11:26:27 +02:00
Johannes Bornhold
3e49389eff
authn: Store legacy plugins prefix in module variable.
2016-06-06 11:24:23 +02:00
Johannes Bornhold
8906d7163b
authn: Add docstring to function that discovers legacy plugins.
2016-06-06 10:49:40 +02:00
Johannes Bornhold
a8d92f8858
authn: Import legacy authentication modules and invoke their includeme.
2016-06-06 10:07:24 +02:00
Johannes Bornhold
6868abc1b7
authn: Load legacy plugin ID's from DB and log them.
2016-06-06 09:11:39 +02:00
Marcin Kuzminski
14cb9ac285
ldap-auth: fixed wrong Missing check
2016-06-08 14:03:02 +02:00
Johannes Bornhold
d05c4fb045
authn: Use new is_headers_auth function.
2016-06-06 10:15:00 +02:00
Johannes Bornhold
50474589c2
authn: Deprecate the is_container_auth function.
2016-06-06 10:22:42 +02:00
Johannes Bornhold
a29b8b84a5
authn: Rename 'container' -> 'headers' in authentication.
2016-06-06 10:33:01 +02:00
Johannes Bornhold
d1c5c52375
authn: Log a warning message if fallback authentication plugin is enabled in ini file.
2016-06-03 15:02:08 +02:00
Johannes Bornhold
0ba8db517b
authn: Fix ordering of authentication plugins.
2016-06-03 12:08:55 +02:00
Johannes Bornhold
a44e92e154
authn: Fix form validation of authentication plugins.
...
- Check if plugin exists.
- Display an apropriate error message if it doesn't exist.
2016-06-03 11:22:13 +02:00
Marcin Kuzminski
eda3da26e5
auth-token: added missing renderers for token plugin
2016-06-03 20:49:04 +02:00
Johannes Bornhold
18376347ca
authn: Fix handling of form errors and default values.
2016-06-03 10:02:59 +02:00
Johannes Bornhold
409eef8c0d
authn: Set the renderer attribute when registering settings view.
2016-06-02 17:09:55 +02:00
Johannes Bornhold
4a184c7278
authn: Remove unused code
...
Unused due to the previoud refactoring.
2016-06-02 17:08:11 +02:00
Johannes Bornhold
269dfe46e1
authn: Refactored the auth-plugins-settings base view.
...
This allows plugins to easier extend the template context dict
without duplicate the code of the base views.
2016-06-02 17:07:38 +02:00
Johannes Bornhold
670df02b64
authn: Add rhodecode token auth plugin.
2016-06-03 13:57:24 +02:00
Johannes Bornhold
284957a394
authn: Renamed auth_container -> auth_headers
2016-05-30 15:26:26 +02:00
Johannes Bornhold
6713b054ef
authn: Add whitespace stripping to authentication plugin settings.
2016-05-27 20:21:13 +02:00
Johannes Bornhold
d593bef27b
authn: Add container authentication plugin again.
2016-05-27 19:31:30 +02:00
Johannes Bornhold
b3562f3708
authn: Add an INI option to set an authentication plugin fallback. #3953
...
If you set 'rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode'
in your INI file the rhodecode auth plugin is always appended to the list of plugins
that are used for authentication.
2016-05-27 10:36:30 +02:00
Johannes Bornhold
e3428604d0
i18n: Use new translation string factory.
...
- Use the translation factory create in rhodecode.translation
instead of creating multiple instances in each module.
2016-05-27 12:15:09 +02:00
Johannes Bornhold
ce2aa59dea
auth: Remove AuthomaticBase class.
...
- Code will be moved to the EE version.
2016-05-24 15:41:09 +02:00
Johannes Bornhold
faab12bfec
authn: Fix error in call to logger.
2016-05-23 21:02:43 +02:00
Marcin Kuzminski
19ef5c2721
authn: don't use formatted_json to log statements. It totally screws up
...
logging formatting, and makes big entries in logs with newlines.
2016-05-24 23:47:32 +02:00
Marcin Kuzminski
9a0d8c0b77
project: added all source files and assets
2016-05-24 15:56:53 +02:00