aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/edit
Commit message (Collapse)AuthorAgeFilesLines
* Fixes #899 : DeprecationWarning about Required going away in WTForms 3.0. ↵Loïc Le Ninan2014-06-131-7/+7
| | | | Replaced Required with InputRequired.
* Cleaned up the code a little bittilly-Q2014-05-141-2/+2
|
* Tweaked the metadata edit screen to run jsonschema validators against the data.tilly-Q2014-05-142-11/+36
|
* Made some changes so that the metadata editing page works well with the updatedtilly-Q2014-05-122-24/+6
| | | | metadata tools.
* Changed the format of the wtforms table slightlytilly-Q2014-05-121-2/+2
|
* Added in a few blank lines when a user edits the metadata of a file that hastilly-Q2014-05-061-0/+10
| | | | none.
* Made it so the metadata editting page is only one step away from functioningtilly-Q2014-05-061-1/+15
| | | | correctly.
* Created a UI for editting a media's metadata. Had to add a new macro totilly-Q2014-05-062-6/+22
| | | | wtforms.html in the process.
* Set up the metadata editor formstilly-Q2014-05-061-2/+8
|
* Created the media metadata editor pagetilly-Q2014-05-062-1/+17
|
* Merge remote-tracking branch 'refs/remotes/tilly-q/OPW-Moderation-Update'Christopher Allan Webber2013-10-072-4/+4
|\ | | | | | | | | | | | | Conflicts: mediagoblin/templates/mediagoblin/user_pages/user.html mediagoblin/tests/test_auth.py mediagoblin/tests/test_submission.py
| * Merge branch 'master' into OPW-Moderation-Updatetilly-Q2013-09-123-43/+75
| |\ | | | | | | | | | | | | Conflicts: mediagoblin/db/migrations.py
| * | This has been an update to clean out the code a little bit. The primary changetilly-Q2013-08-132-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I made was I added the method has_privilege (which takes a variable amount of unicode privilege names as an argument) to the User model. This method allowed for much cleaner checks as to whether or not a user has a privilege. Other- wise, I also made it impossible for moderators to punish admins. I created a new url path and three new pages for Users to look at filed reports and the code of conduct for the mg instance. === Made reports on admins not resolvable by moderators: --\ mediagoblin/moderation/views.py --\ mediagoblin/templates/mediagoblin/moderation/report.html === Created new files for the new pages: --\ mediagoblin/meta/__init__.py --\ mediagoblin/meta/routing.py --\ mediagoblin/meta/views.py --\ mediagoblin/templates/mediagoblin/meta/code_of_conduct.html --\ mediagoblin/templates/mediagoblin/meta/reports_details.html --\ mediagoblin/templates/mediagoblin/meta/reports_panel.html --\ mediagoblin/routing.py --\ mediagoblin/static/css/base.css === Replaced vestigial methods of checking a user's privilege with the more ====== effective method has_privilege(u'privilege_name'): --\ mediagoblin/db/models.py --| Added in the has_privilege method to the User class --\ mediagoblin/db/migrations.py --\ mediagoblin/db/models.py --\ mediagoblin/decorators.py --\ mediagoblin/edit/lib.py --\ mediagoblin/edit/views.py --\ mediagoblin/gmg_commands/users.py --\ mediagoblin/moderation/views.py --\ mediagoblin/templates/mediagoblin/base.html --\ mediagoblin/templates/mediagoblin/user_pages/collection.html --\ mediagoblin/templates/mediagoblin/user_pages/media.html --\ mediagoblin/templates/mediagoblin/user_pages/user.html --\ mediagoblin/templates/mediagoblin/utils/collection_gallery.html --\ mediagoblin/user_pages/views.py === Minor UI changes --\ mediagoblin/templates/mediagoblin/moderation/report_panel.html --\ mediagoblin/templates/mediagoblin/moderation/user.html === Other Bugs: --\ mediagoblin/tools/response.py --\ mediagoblin/db/migrations.py
* | | Fixing ALL THE BROKEN TESTS. I probably broke most of them.Christopher Allan Webber2013-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - We've now broken out user.html and user_nonactive.html but the tests didn't reflect it - the location of one of the module imports broke, but I didn't notice because of .pyc files ;) This commit sponsored by Tiberiu C. Turbureanu (ceata.org). Thank you!
* | | Fixing import error after merge of basic_auth branch.Christopher Allan Webber2013-09-191-2/+3
| | | | | | | | | | | | This commit sponsored by geoffrey jost. Thank you!
* | | Merge remote-tracking branch 'refs/remotes/rodney757/auth_refactor'Christopher Allan Webber2013-09-193-43/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Conflicts: mediagoblin/auth/views.py mediagoblin/edit/forms.py mediagoblin/templates/mediagoblin/edit/edit_account.html
| * | moved change_pass to basic_auth and fixed some typos with the moving of ↵Rodney Ewing2013-08-163-56/+0
| |/ | | | | | | forgot pass
* | Improve checkbox descriptionSebastian Spaeth2013-09-041-1/+1
| | | | | | | | Do not Enable/Disable next to a checkbox. So what does an enabled checkbox do then?
* | didn't remove form.new_email when change email was moved to its own viewRodney Ewing2013-08-311-11/+7
| |
* | Merge remote-tracking branch 'refs/remotes/rodney757/email'Christopher Allan Webber2013-08-253-31/+63
|\ \
| * | check for form.password in the off chance that a user is logged in and the ↵Rodney Ewing2013-08-201-1/+1
| | | | | | | | | | | | server switches the authentication method from basic_auth to openid.
| * | maybe have change password and email on same pageRodney Ewing2013-08-203-31/+63
| |/
* / add user prefrence for insite notificationsRodney Ewing2013-08-202-1/+5
|/
* fix for boolean fieldsRodney Ewing2013-07-111-1/+0
|
* Patch by Strum. Ticket #451 - Convert all mongokit style .find, .find_one, ↵Rodney Ewing2013-07-111-3/+3
| | | | .one calls over to SQLAlchemy queries
* merge --squash openid branch to take care of a false merge commit in theRodney Ewing2013-07-031-24/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | basic_auth branch that openid is forked from Commits squashed together (in reverse chronological order): - do the label thing only for boolean fields - made edit_account to autofocus on the first field - added feature to render_divs where if field.label == '' then it will render form.description the same a render_label - added allow_registration check - refactored create_user - removed verification_key from create_user - removed get_user from openid - cleanup after removing openid from template_env.globals - fix for werkzueg 0.9.1 - cleanup after merge - more tests - restored openid extra_validation just for safety - tests for openid - deleted openid extra_validation - passed next parameter in session for openid - fixed a bug that was deleting the messages - implemented openid store using sqlalchemy - ask openid provider for 'nickname' to prefill username in registration form - refactored delete openid url to work with generic urls such as google and to not allow a user to delete a url if it is there only one and they don't have a pw - refactored login to register user workflow, which fixed a problem where the 'or register with a password link' wasn't showing up when the finish_login view called the register view because there wasn't any redirect. - added the ability to remove openid's - added the ability to add openids to an existing account - refactored start_login and finish_login views - modified edit_account.html to use render_divs - modified gmg/edit/views to behave appropriatly if no password authentication is enabled. moved the update email stuff to it's own funtion to make edit_account view cleaner. edit_account now modifies the form depending on the plugins. - minor typos - added retrieving email from openid provider - moved allow_registration check to a decorator - moved check if auth is enabled to a decorator - changed openid user registration to go through login first - cleanup after merge - modified verification emails to use itsdangerous tokens - added error handling on bad token, fixed route, and added tests - added support for user to change email address - added link to login view openid/password in login template - updated openid get_user function - modified get_user function to take kwargs instead of username - no need for user might be email kwarg in check_login_simple - added gen_password_hash and check_password functions to auth/__init__ - added focus to form input - made imports fully qualified - modified basic_auth.check_login to check that the user has a pw_hash first - changed occurances of form.data['whatever'] to form.whatever.data - convert tabs to spaces in register template, remove unsed templates, and fixed trans tags in templates - in process of openid login. it works, but needs major imporvements - make password field required in basic_auth form - check if password field present in basic_auth create_user - modified openid create_user function - modified models based on Elronds suggestions - changed register form action to a variable to be passed in by the view using the template - openid plugin v0, still need to authenticate via openid. - 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. - 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. - 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. - added models and migrations for openid plugin
* added feature to render_divs where if field.label == '' then it will render ↵Rodney Ewing2013-06-251-2/+3
| | | | form.description the same a render_label
* cleanup after mergeRodney Ewing2013-06-251-0/+1
|
* Merge remote-tracking branch 'upstream/master' into authRodney Ewing2013-06-253-23/+103
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: mediagoblin/app.py mediagoblin/auth/forms.py mediagoblin/auth/tools.py mediagoblin/db/migrations.py mediagoblin/db/models.py mediagoblin/edit/views.py mediagoblin/plugins/basic_auth/tools.py mediagoblin/tests/test_edit.py
| * Removing the "enter your password to change your email" bit.Christopher Allan Webber2013-06-212-37/+23
| | | | | | | | | | | | | | A good idea, though it feels fairly clumsy in the form, and I think if you're logged in you can already sabotage the user pretty well. This commit sponsored by Sergey Matveev. Thanks!
| * send_verification_email was moved to auth/toolsRodney Ewing2013-05-291-1/+2
| |
| * form is already validated, no need to validate againRodney Ewing2013-05-291-6/+2
| |
| * added error handling on bad token, fixed route, and added testsRodney Ewing2013-05-242-5/+16
| |
| * added support for user to change email addressRodney Ewing2013-05-243-17/+104
| |
* | fixed failing tests after rebaseRodney Ewing2013-05-241-2/+2
| |
* | moved bcrypt_gen_password_hash to basic_auth/tools and added ↵Rodney Ewing2013-05-241-1/+0
| | | | | | | | gen_password_hash function to auth/__init__
* | moved bcrypt_check_password to basic_auth/tools from auth/libRodney Ewing2013-05-241-0/+1
|/
* fixed translation, and changed tabs to spaces, and change it so the user can ↵Rodney Ewing2013-05-211-1/+2
| | | | view their password as they're typing.
* moved change pass to a seperate view and fixed issues 709Rodney Ewing2013-05-203-23/+50
|
* Create redir_obj and use it around.Elrond2013-04-281-6/+4
| | | | | | | | This is a shortcut function to redirect to the main page for an object. Objects currently supported: media entries and collections. And go around and replace various places to use this.
* No lazy_* needed here; Add ReallyLazyProxy.__repr__.Elrond2013-04-251-1/+1
| | | | | | | | | | | | One should use lazy_* only if you have a good reason. This one found by our unit tests! For example add_message adds the message to the session, the session needs to be serialized (with json) and well, LazyProxy is not serializable. To aid in debugging, gave our ReallyLazyProxy a __repr__.
* Fix-bug-667-Use-lazy_pass_to_ugettext-for-forms.Aditi Mittal2013-04-242-2/+2
|
* Use GenerateSlugMixin for collections.Elrond2013-04-061-1/+1
| | | | | Use the new way of generating slugs also for collections. Also drop the dummy_db arg to check_collection_slug_used.
* Use WTForms data field in edit/views.pyHans Lo2013-03-271-16/+16
|
* Use the media id for attachmemt editing.Elrond2013-02-241-2/+2
| | | | And remove some stray white space from the output.
* removed unused import cgi.FieldStorageAndrás Veres-Szentkirályi2013-02-221-1/+0
|
* user.get('moo') -> user.mooSebastian Spaeth2013-01-221-4/+4
| | | | | | | User fields are always existent, so there is no need to .get() them, just use them directly. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Merge remote-tracking branch 'refs/remotes/spaetz/521_license_preference' ↵Christopher Allan Webber2013-01-222-36/+44
|\ | | | | | | into mergetest
| * Add a license preference fieldMark Holmquist2013-01-172-36/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | This feature is absolutely necessary. Now a user can simply define their default license and quickly go through a form, as opposed to stopping to click on the select and choosing the same option over and over again. Also added DB migration for the field, so that's working now, too. Rebased by Sebastian and made the default value to be unicode. Reviewed-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | Sanitize slug input on media editSebastian Spaeth2013-01-181-7/+6
|/ | | | | | | | | Previously we allowed EVERYTHING, even slashes as slug when editing the media. Make sure we slugify the input to sanitize it. (+ string formdata is unicode, so there is no need to convert it) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>