19 Commits

Author SHA1 Message Date
Jessica Tallon
b4997540dc Fix some unit tests and bugs
This fixes a lot of the issues with the LocalUser changes that were
merged recently. There was a problem where the attributes of LocalUser
were not being eagerly loaded and because the Session was detached an
exception was being raised when they were accessed.

This also fixes some typo's which were introduced.

Finally this adds a temporary fix for a potential SQLAlchemy bug, this
is a bug where doing:

    User.query.filter(LocalUser.username == "some_username").first()

does NOT yeild a user with the username "some_username" but all users
on the site. The temp fix is to just query the LocalUser, this should
be resolved when bug is confirmed and fixed upstream.
2015-08-24 21:07:06 +02:00
Jessica Tallon
d88fcb03e2 Change codebase to query or create correct User model
The code base had many references to User.username and other
specific to LocalUser attributes as that was the way it use to exist.
This updates those to query on the generic User model but filtering
by attributes on the LocalUser.
2015-07-31 15:15:24 +02:00
Jakob Kramer
f4686cde16 wtforms.fields.TextField was deprecated
WTForms documentation:
> The TextField alias for StringField is deprecated.

Signed-off-by: Berker Peksag <berker.peksag@gmail.com>
2015-03-12 21:57:53 +02:00
Christopher Allan Webber
f6bad0eb26 Merge branch 'master' into merge-python3-port
Has some issues, will iteratively fix!

Conflicts:
	mediagoblin/gmg_commands/__init__.py
	mediagoblin/gmg_commands/deletemedia.py
	mediagoblin/gmg_commands/users.py
	mediagoblin/oauth/views.py
	mediagoblin/plugins/api/views.py
	mediagoblin/tests/test_api.py
	mediagoblin/tests/test_edit.py
	mediagoblin/tests/test_oauth1.py
	mediagoblin/tests/test_util.py
	mediagoblin/tools/mail.py
	mediagoblin/webfinger/views.py
	setup.py
2014-09-16 14:01:43 -05:00
Loïc Le Ninan
0742e11dff Fixes #899 : DeprecationWarning about Required going away in WTForms 3.0. Replaced Required with InputRequired. 2014-06-13 10:23:07 -05:00
Berker Peksag
e49b7e02b2 Use six.text_type instead of unicode().
I will be switch to use ``from __future__ import unicode_literals`` later.
2014-06-02 20:59:28 +03:00
Berker Peksag
386c9c7c55 Use six.iteritems() instead of dict.iteritems(). 2014-05-26 19:50:38 +03:00
Christopher Allan Webber
c6b6be17a4 LDAP readme link 2013-11-30 14:46:06 -06:00
Rodney Ewing
1bc5b9dfb1 catch a keyerror 2013-08-15 16:01:48 -07:00
Rodney Ewing
f92018b649 typo in docs 2013-08-15 16:01:35 -07:00
Rodney Ewing
994e70e85e added docs for ldap plugin 2013-08-15 16:01:22 -07:00
Rodney Ewing
2b55a0f865 use pluginapi.get_config 2013-08-15 16:01:03 -07:00
Rodney Ewing
8e7f78933e removed unused import 2013-08-15 15:59:50 -07:00
Rodney Ewing
547ab1d9d0 added a create_account hook 2013-08-15 15:58:44 -07:00
Rodney Ewing
bcc12142ae only create a user if the register_form is from the ldap plugin 2013-08-15 15:58:14 -07:00
Rodney Ewing
517eb8b443 - fixed typo with unbinding code
- added the ability to get the user's email from the ldap server upon registration
2013-08-15 15:57:59 -07:00
Rodney Ewing
11782c0061 - changed host and port to just a server uri
- added an option to connect with TLS
- unbind after when done
2013-08-15 15:57:44 -07:00
Rodney Ewing
c4513740bf ldap uses it own views 2013-08-15 15:56:20 -07:00
Rodney Ewing
daf29c011a starting ldap plugin 2013-08-15 15:56:03 -07:00