Rodney Ewing
377db0e7ff
added error handling on bad token, fixed route, and added tests
2013-05-24 18:16:12 -07:00
Rodney Ewing
89e1563f68
added support for user to change email address
2013-05-24 18:16:12 -07:00
Rodney Ewing
f339b76a4e
moving forgot_password views back to gmg/auth and cleanup
2013-05-24 18:09:57 -07:00
Rodney Ewing
9008e09941
fixed failing tests after rebase
2013-05-24 16:52:50 -07:00
Rodney Ewing
b194f29fe3
added gen_password_hash and check_password functions to auth/__init__
2013-05-24 16:52:50 -07:00
Rodney Ewing
57e8be21bc
added focus to form input
...
Conflicts:
mediagoblin/auth/views.py
mediagoblin/plugins/openid/views.py
2013-05-24 16:52:50 -07:00
Rodney Ewing
09ae2df4eb
modified basic_auth.check_login to check that the user has a pw_hash first
2013-05-24 16:52:49 -07:00
Rodney Ewing
569873d8f0
changed occurances of form.data['whatever'] to form.whatever.data
...
Conflicts:
mediagoblin/plugins/basic_auth/__init__.py
mediagoblin/plugins/openid/__init__.py
2013-05-24 16:52:49 -07:00
Rodney Ewing
94d77e1fc1
check if password field present in basic_auth create_user
2013-05-24 16:52:49 -07:00
Rodney Ewing
5784c12d79
added a register_user function to be able to use in a plugin's register view, and modified auth/views.register to redirect to openid/register if appropriate.
2013-05-24 16:52:49 -07:00
Rodney Ewing
c94316bff4
Modified basic_auth plugin to work with modified auth plugin hooks. Added context variables. Removed basic_auth/tools which was previously renamed to basic_auth/lib.
2013-05-24 16:52:49 -07:00
Rodney Ewing
c3e3882e39
modified auth/__init__ hooks to work better with multiple plugins. Removed auth/lib.py. And added a basic_extra_verification function that all plugins will use.
2013-05-24 16:52:49 -07:00
Rodney Ewing
20583e8a4d
removed check_login from db mixin
2013-05-24 16:52:49 -07:00
Rodney Ewing
ba016fda9a
added Copyright header to basic_auth/forms.py
2013-05-24 16:52:49 -07:00
Rodney Ewing
14efa7bdf1
moved fake_login_attempt to plugins
2013-05-24 16:52:49 -07:00
Rodney Ewing
c9dec8b3cc
log a previously logged in user when switched to no_auth mode
2013-05-24 16:52:49 -07:00
Rodney Ewing
dfd3f561af
added tests for no_auth feature
2013-05-24 16:52:48 -07:00
Rodney Ewing
f644293ea8
changed from sys.exit() to raise AuthError for handling no_auth=false in config and no auth plugin present
2013-05-24 16:52:48 -07:00
Rodney Ewing
7a98eb73d9
existing test all passing now
2013-05-24 16:52:48 -07:00
Rodney Ewing
fa7232913c
modified test .ini files and changed tests to use basic_auth bcrypt
2013-05-24 16:52:48 -07:00
Rodney Ewing
f65615eaf9
renamed hook as to no conflict with existing hook names
2013-05-24 16:52:48 -07:00
Rodney Ewing
5b6923ab84
renamed basic_auth/tools to basic_auth/lib
2013-05-24 16:52:48 -07:00
Rodney Ewing
0bd654a346
modified check_login function to return None instead of False to be able to have multiple plugins check_login
2013-05-24 16:52:48 -07:00
Rodney Ewing
9c2c9be79d
moved bcrypt_gen_password_hash to basic_auth/tools and added gen_password_hash function to auth/__init__
2013-05-24 16:52:48 -07:00
Rodney Ewing
d54cf48a33
moved bcrypt_check_password to basic_auth/tools from auth/lib
2013-05-24 16:52:48 -07:00
Rodney Ewing
744f1c83b9
add a check for authentication plugin on startup and respond according to no_auth config option. allows instance to be run w/o authentication
2013-05-24 16:52:48 -07:00
Rodney Ewing
b56b6b1e77
changed User model pw_hash field to nullable and added migrations
2013-05-24 16:52:48 -07:00
Rodney Ewing
0f3504e35b
moved normalize_user_or_email_field to auth/tools.py from auth/forms.py
2013-05-24 16:52:47 -07:00
Rodney Ewing
58460a8301
moved forgot pw views to basic_auth plugin
2013-05-24 16:52:47 -07:00
Rodney Ewing
77e1aca8db
added login.html template hook and basic_auth login template
2013-05-24 16:51:27 -07:00
Rodney Ewing
ee355966c8
basic_auth v0 plugin working
2013-05-24 16:51:27 -07:00
Rodney Ewing
7cb7653c64
moved normalize_user_or_email_field to auth/tools.py from auth/forms.py
2013-05-23 14:29:19 -07:00
Joar Wandborg
14aa2eaa19
Cleaned up EXIF view
...
The last update made the assumption that EXIF metadata is in some way
consistent between camera models, images, manufacturers. This update
takes into account that nothing is certain whenever EXIF is involved.
2013-05-23 22:21:02 +02:00
Christopher Allan Webber
23055eb394
Full unit test for the plugin assetlink command.
...
Tests:
- if the link doesn't exist yet
- if the link already exists
- if it is a symlink to something else
- if it exists but is not a symlink
This commit sponsored by Lon Koenig. Thank you!
2013-05-23 13:33:08 -05:00
Christopher Allan Webber
9230968f7e
Cleaning a bit: os.path.sep.join -> os.path.join
2013-05-23 13:33:08 -05:00
Christopher Allan Webber
247759caa7
docstring update: link theme... and plugins!
2013-05-23 13:33:08 -05:00
Christopher Allan Webber
6afc8364e0
Generalize "gmg theme assetlink" -> "gmg assetlink" and cover both theme and plugins
...
We've moved the module... probably I'll re-add theme just to give a
warning that this is deprecated.
This commit sponsored by Kevin Williams. Thank you!
2013-05-23 13:33:08 -05:00
Christopher Allan Webber
bdd23c0eae
test_plugin_staticdirect now works and passes.
...
This commit sponsored by Samuel Vale. Thank you!
2013-05-23 13:33:08 -05:00
Christopher Allan Webber
1b2cf1e823
Simple "staticstuff" plugin for writing unit tests on plugin static asset linking.
...
It doesn't do much... it just has a static directory with a "bunnify"
CSS file and has a unit test that returns a json encoded set of a
staticdirect with both this plugin enabled and also
with (theoretically) a file distributed with MediaGoblin (it isn't
really, but in our case that doesn't matter.)
Also set up the static_setup hook / PluginStatic object for this
plugin; testing that with `./bin/gmg theme assetlink` seemed to work.
(And argh, need to update that command name, I know.)
This commit sponsored by Bradley Kuhn. Thanks bkuhn!
2013-05-23 13:33:07 -05:00
Christopher Allan Webber
df69695d9e
Various fixes to plugin assetlinking command.
...
Actually trying to run the command helps figure out what needs to be
fixed :)
This commit sponsored by Justin Nichol. Thank you!
2013-05-23 13:33:07 -05:00
Christopher Allan Webber
491029bc36
Moving test_user_dev->user_dev in plugin app configs & adding plugin static serving
...
The test_user_dev (as opposed to user_dev) was a legacy before we had
each application running in its own directory (as they now do in
pytest). Move that name to just user_dev... this is more consistent
with the rest of our naming and will make writing these config files
easier. (If we want to test that changing these still works, that
should be a separate unit test with special config files.)
Additionally, add plugin static serving to the common test paste
config file.
This commit sponsored by Juan Jose Marin Martinez. Thank you!
2013-05-23 13:33:07 -05:00
Christopher Allan Webber
5ccb16ca20
Work towards getting plugin static linking/serving to work
...
- add link_plugin_assets. For now, incorrectly running from
./bin/gmg theme assetlink... uh, will fix ;)
- Update paste and config_spec.ini configs to handle the locations
and serving of the plugins' static resources
This commit sponsored by Marko Dimjašević. Thank you!
2013-05-23 13:33:07 -05:00
Christopher Allan Webber
d6d2c771bd
Start of ability to have plugins provide static resources!
...
Note I have not tested any of this yet ;) But we're already on our way:
- We've got docs
- The hook is there
Lots to do still though. But, progress! :)
This commit sponsored by Laura Arjona Reina. Thanks larjona!
2013-05-23 13:33:07 -05:00
Christopher Allan Webber
8ca51d32b6
Move "bits" templates with dashes in them to underscores
...
Moved all references and also added a note to our release notes.
This commit sponsored by Juan Rodriguez. Thank you!
2013-05-22 16:44:50 -05:00
Christopher Allan Webber
ae9eca1bf2
Moved frontpage "welcome" stuff into its own bits file.
...
This should make it easier to override just that part of the page.
This commit sponsored by David Rylander. Thank you!
2013-05-22 16:33:07 -05:00
Mats Sjöberg
cac478e5aa
Piwigo minor fix in categories_getList.
2013-05-21 22:55:55 +03:00
Mats Sjöberg
94d3192041
Piwigo: some sanity checks before adding to collection as per Elrond's suggestions.
2013-05-21 22:46:57 +03:00
Mats Sjöberg
7da90d56d1
Piwigo: return collections list only to logged in users.
2013-05-21 22:42:41 +03:00
Mats Sjöberg
4150110607
Rudimentary collections support for piwigo plugin.
2013-05-21 22:40:02 +03:00
Mats Sjöberg
18e64476e9
Fixed minor typo in piwigo logging.
2013-05-21 22:39:37 +03:00