Commit graph

50 commits

Author SHA1 Message Date
Robert Sparks d9cc26be96
feat: replace references to User with references to Person (#6024)
* refactor: change references from User to Person (#5821)

* refactor: Change CommunityList reference from User to Person

* refactor: Convert more user references to person

* refactor: Change augment_docs_and_user_with_user_info to person

* refactor: Change Nomination and Feedback references from User to Person

* refactor: Change a few test case function signatures to be more pythonic

* refactor: Harmonize how profile and photo views look up email_or_name

* refactor: Rework community views to operate on Person instead of User (#5859)

* test: Update tests to try all of the person's emails and aliases

* fix: Recode a test case to avoid an exception if there's Unicode in the URL

This only happens using the form-filling and submission feature of
WebTest, which is only used in this one test case, so just it rip out.

* test: Add duplicate-person tests

* fix: If there are multiple matching users, prefer the logged-in one.

* chore: We no longer use WebTest, so don't include it.

* fix: Address review comments

* fix: case-insensitive person name or email matching (#6096)

* chore: Renumber migrations

* fix: Update merged code so tests pass (#6887)

* fix: Use refactored method

* fix: Don't assume user has person

* fix: Use new view param name

* chore: Drop community lists w/o person; cleanup (#6896)

* fix: Don't assume user has person

* fix: user->person in update_community_list_index.py

* feat: Remove CommunityLists without Person

* refactor: Speed up nomcom migrations

---------

Co-authored-by: Paul Selkirk <paul@painless-security.com>
Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
2024-01-24 11:00:19 -06:00
Robert Sparks c38ade6e1b
feat: treat django auth username as case insensitive throughout the datatracker (#5165)
* feat: insensitive username matching at django authentication

* feat: use iexact when using the User object manager

* fix: more places to ignore username case

* fix: remove unused management command

* fix: avoid get when probing for object existance

* fix: force lowercase new usernames in secr/rolodex

* fix: use explicit arguments when creating user
2023-02-21 10:01:03 -06:00
Henrik Levkowetz 10b56c4e33 Fixed a place where data provider for a POST in contained None, which cannot be serialized into POST data. Found by Django 2.2 checks.
- Legacy-Id: 18085
2020-06-27 17:23:47 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz 2d7c9629aa Added 'from __future__' imports all over the place, to bring code behaviour into closer alignment between python2 and python3
- Legacy-Id: 16446
2019-07-15 15:40:51 +00:00
Henrik Levkowetz d7f5c84182 Initial 2to3 patch with added copyright statement updates.
- Legacy-Id: 16309
2019-06-27 14:40:54 +00:00
Henrik Levkowetz 4e8ef492fc Modified the rolodex code to make sure we capture information about the origin of email addresses if they are added by the secretariat, to ensure GPR compliance.
- Legacy-Id: 15898
2019-01-18 18:27:29 +00:00
Robert Sparks 87bda66740 Converted several secr apps to use factories for tests. Commit ready for merge.
- Legacy-Id: 15568
2018-10-12 22:08:31 +00:00
Ryan Cross dd2487e946 Make email address read-only in rolodex edit form. Fixes #2602. Commit ready for merge
- Legacy-Id: 15522
2018-10-05 00:23:10 +00:00
Henrik Levkowetz f0c0753e28 Added email origin information to some function calls that needed it.
- Legacy-Id: 15130
2018-05-05 12:49:10 +00:00
Henrik Levkowetz a66639299d Removed all references to the removed Person.affiliation field.
- Legacy-Id: 15129
2018-05-05 12:47:55 +00:00
Henrik Levkowetz 53c4ac36db Removed the Person.address field, which is not being used. This was a legacy from the 2001 perl-based datatracker tables. Fixes issue #2504.
- Legacy-Id: 15095
2018-04-27 14:00:33 +00:00
Henrik Levkowetz ad2139dc8f Fixed a settings typo.
- Legacy-Id: 14725
2018-03-03 18:30:19 +00:00
Henrik Levkowetz ad3701e457 Fixed an issue with the test_edit_replace_user() test
- Legacy-Id: 13740
2017-06-30 11:49:18 +00:00
Henrik Levkowetz ade8973015 Merged in [13726] from rcross@amsl.com:
Update secr.rolodex app to deactivate old Users when replaced on edit.  Fixes #2001.
 - Legacy-Id: 13735
Note: SVN reference [13726] has been migrated to Git commit a251076903
2017-06-29 20:39:52 +00:00
Ryan Cross a251076903 Update secr.rolodex app to deactivate old Users when replaced on edit. Fixes #2001. Commit ready for merge.
- Legacy-Id: 13726
2017-06-28 20:43:28 +00:00
Henrik Levkowetz 2070bbfed6 Merged in [13722] and [13712] from rcross@amsl.com:
Remove all use of request.session from secretariat apps.  Add tests for affected views.  Fixes #1455.
 - Legacy-Id: 13724
Note: SVN reference [13712] has been migrated to Git commit 915b445bcffcd4687fb1677230b98282d22dd9a0

Note: SVN reference [13722] has been migrated to Git commit 3a2cb9d3d846168f75d9796b4e5383bdf10b1f60
2017-06-28 14:55:10 +00:00
Lars Eggert 8a70e9773d Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
- Legacy-Id: 13112
2017-03-25 19:16:45 +00:00
Henrik Levkowetz 5f053ad21a Cleaned up the remaining explicit url names, using dotted-paths to view
functions instead.  In all almost 700 changes.
 - Legacy-Id: 12923
2017-02-26 23:21:49 +00:00
Henrik Levkowetz 74af0f5658 Replaced another bunch of explicit url names with dotted-path to the view function.
- Legacy-Id: 12849
2017-02-15 22:11:20 +00:00
Henrik Levkowetz aa5e61d958 Updated all urlpatterns to use ietf.utils.urls.url() instead of django's,
in order to autogenerate dotted path url pattern names.  Updated a number
of url reverses to use dotted path, and removed explicit url pattern names
as needed.

Changed some imports to prevent import of ietf.urls before django
initialization was complete.


Changed 3 cases of form classes being curried to functions; django 1.10
didn't accept that.

Started converting old-style middleware classes to new-style middleware
functions (incomplete).

Tweaked a nomcom decorator to preserve function names and attributes, like
a good decorator should.

Replaced the removed django templatetag 'removetags' with our own version
which uses bleach, and does sanitizing in addition to removing explicitly
mentionied html tags.

Rewrote the filename argument handling in a management command which had
broken with the upgrade.
 - Legacy-Id: 12818
2017-02-11 14:43:01 +00:00
Henrik Levkowetz 19d585255a Django 1.10 does not permit the view argument to url() to be a string any more. Changed all cases view arguments to url() which were strings to instead reference the actual imported function.
- Legacy-Id: 12815
2017-02-10 14:49:16 +00:00
Henrik Levkowetz 7b95411f58 The context_instance parameter to render_to_response() and render_to_string() is now deprecated. Fixed this, and generally changed the idiom render_to_response('template.html', {}, RequestContext(request)) to the newer and simpler render(request, 'template.html', {}). About 200 instances.
- Legacy-Id: 12637
2017-01-09 21:26:30 +00:00
Henrik Levkowetz c2541ec04b Django 1.9: Removed deprecated use of django.conf.urls.patterns() from all urls*.py files.
- Legacy-Id: 12618
2016-12-22 17:21:57 +00:00
Henrik Levkowetz ec684e1b4e Added a pylint rc-file, and fixed or silenced a number of issues found by pylint using the settings .pylintrc (which enable only error checking).
- Legacy-Id: 11941
2016-09-08 14:48:59 +00:00
Henrik Levkowetz a15d0ecbd6 Prevent people from adding ietf list addresses to their personal accounts.
- Legacy-Id: 11218
2016-05-20 22:39:30 +00:00
Henrik Levkowetz 4cac784522 Renamed a bunch of identically named MainTestCase classes.
- Legacy-Id: 10913
2016-03-06 18:18:38 +00:00
Ryan Cross 1145751a9b Improve secretariat rolodex roles section, sort and identify concluded groups. Commit ready for merge.
- Legacy-Id: 10159
2015-10-09 17:55:12 +00:00
Henrik Levkowetz 86997e1e95 Turned the api.py file into a module. Moved the makeresources management command to the api module. Added some api tests. Added crawling of api files to the test-crawler. Adjusted some resource files discovered by the test suite and test-crawler. Removed a bunch of empty model files.
- Legacy-Id: 9144
2015-03-03 20:23:36 +00:00
Henrik Levkowetz 7bd647c0d6 Don't create empty Alias records. Fixes issue #1603.
- Legacy-Id: 9086
2015-02-13 13:04:42 +00:00
Henrik Levkowetz 0db48f3db0 Merged in [8840] from rjsparks@nostrum.com:\n Automatically ensure Alias records exists when Person records are changed, relieving multiple code locations of that responsibility. Fixes bug #1550.
- Legacy-Id: 8873
Note: SVN reference [8840] has been migrated to Git commit b0b3a31b10bb35eb00d29f27d75d21c3cc4edc4e
2015-01-20 22:32:01 +00:00
Ryan Cross 9cf30a07d1 Fixes ticket #1469, trying to add duplicate name in Rolodex causes 500 error. Commit ready for merge
- Legacy-Id: 8723
2014-12-02 18:30:35 +00:00
Ryan Cross 097b936ca8 Remove secauth middleware. Replace with role_required decorators. Commit ready for merge
- Legacy-Id: 8624
2014-11-09 02:32:41 +00:00
Henrik Levkowetz b02b0a96df All tests pass, except for some pyflakes tests which I believe are fixed in trunk.
- Legacy-Id: 7579
2014-04-06 20:04:36 +00:00
Henrik Levkowetz 02031a01b9 Cleaned out some (arbitrary) submodule name imports into ietf.utils, and made the corresponding import statements import the names directly from the correct submodules.
- Legacy-Id: 7495
2014-03-16 07:09:38 +00:00
Henrik Levkowetz 0b65b383f8 Made ietf/secr/rolodex pyflakes-clean.
- Legacy-Id: 7490
2014-03-15 23:30:31 +00:00
Ole Laursen d1782297ab assertEquals -> assertEqual in tests, the former is deprecated
- Legacy-Id: 6964
2013-12-17 12:52:24 +00:00
Ole Laursen d66ac15fc2 Rewrite a bunch of HttpResponseRedirect + url reverse calls to instead
take advantage of the redirect shortcut (introduced in Django 1.1)
 - Legacy-Id: 6960
2013-12-17 10:23:42 +00:00
Ole Laursen 0006b9ddcc Make sure all model forms have a Meta.fields attribute
- Legacy-Id: 6927
2013-12-13 17:20:02 +00:00
Ole Laursen fcb2dad155 Fix bug in Secretariat EditPersonForm, exclude was missing a , to be a tuple
- Legacy-Id: 6894
2013-12-12 12:10:05 +00:00
Ole Laursen fdd03eee8c Use validate_email instead of email_re to validate email
- Legacy-Id: 6893
2013-12-12 12:09:17 +00:00
Ole Laursen cfa0d47ca0 Port to new class-based generic redirect and simple template views, remove utils.lazy.reverse_lazy, it's now included in Django
- Legacy-Id: 6878
2013-12-11 16:36:09 +00:00
Ole Laursen 9457669310 Merge in changes from the old shimfree branch
- Legacy-Id: 6764
2013-11-27 12:55:50 +00:00
Henrik Levkowetz e4f4467725 Changed tests to use our own subclassed TestCase, and changed almost all fixtures to be perma_fixtures.
- Legacy-Id: 6320
2013-09-30 20:36:20 +00:00
Ole Laursen c191a691e0 Remove "names" fixture from all tests, since it's now loaded once just
after creating the test database through the global test fixture
mechanism - this speeds up multiple tests considerably
 - Legacy-Id: 6305
2013-09-29 17:35:59 +00:00
Henrik Levkowetz d8074d39d3 Merged the latest secretariat code from rcross@amsl.com, from branch/amsl/trunkmerge@6149.
- Legacy-Id: 6168
2013-09-18 19:33:36 +00:00
Ryan Cross dd189eb5fe add missing import of IntegrityError
- Legacy-Id: 5605
2013-04-03 18:08:05 +00:00
Henrik Levkowetz 7e67b40a87 Merged in branch/amsl/trunkmerge@5449 from rcross@amsl.com, with some tweaks. This provides the secretariat apps.
- Legacy-Id: 5482
2013-03-05 22:43:31 +00:00
Ryan Cross c32aee9874 add basic tests
- Legacy-Id: 5437
2013-02-21 00:41:04 +00:00
Ryan Cross 1f3ca71362 add apps
- Legacy-Id: 5430
2013-02-15 18:10:38 +00:00