Commit graph

37 commits

Author SHA1 Message Date
Jennifer Richards a338df16f2
fix: 404 instead of 300 for ambiguous email_or_person (#8004)
* fix: 404 on CommunityList name collision

* fix: 404 on ambiuous person for photo() view

* test: update tests

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2024-10-16 11:36:54 -05:00
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
Rich Salz 9aea2a2e8b
fix: Make name/email lookups case-insensitive (#5972) (#6007)
* fix: Make name/email lookups case-insensitive (#5972)

Use icontains so that looking up name or email is case insensitive
Added a test

Fixes: 5972

* fix: Use __iexact not __icontains
2023-07-22 13:16:42 -07:00
Robert Sparks f8113cb862
fix: close open things (#5593)
* fix: close open things

* fix: clean up test created files

* fix: remove one close too many
2023-05-10 11:19:34 -05:00
Jennifer Richards 131cdf9943
fix: drop duplicate alias/email Person records from profile view (#4734)
* fix: drop duplicate alias/email Person records from profile view

* test: test de-duplication of Person records
2022-11-08 17:48:17 +00:00
Kesara Rathnayake 91170430ff
fix: Check both Person and Email records in profile view (#4703) 2022-11-05 17:48:31 +00:00
Jennifer Richards da70acfdff
Merge branch 'feat/tzaware' into jennifer/yet-more-tz-fixes
# Conflicts:
#	ietf/ietfauth/utils.py
#	ietf/meeting/tests_views.py
#	ietf/stats/tests.py
2022-10-17 16:39:45 -03:00
Jennifer Richards cb9e576fb4
fix: return False from has_role() when role_names is the empty list (#4541)
* fix: return False from has_role() when role_names is the empty list

* chore: add comments clarifying the effect of Q()
2022-10-07 16:05:37 -05:00
Jennifer Richards 31d55f1d37
fix: remove unused imports 2022-09-28 17:45:11 -03:00
Jennifer Richards a653582cf7
fix: timezone fixes from last few comparisons with tzaware-obe 2022-09-28 13:21:50 -03:00
Robert Sparks 3697180cc1 Reverted merge of timezone-aware migration efforts.
- Legacy-Id: 18792
2021-01-12 16:54:20 +00:00
Henrik Levkowetz 774e752a54 Snapshot of timezone-aware datatracker code. Tests pass, and the test-crawler shows only expected differences. Trunk changes merged in up to r18768.
- Legacy-Id: 18770
2020-12-16 23:53:37 +00:00
Henrik Levkowetz 23a81923aa Added exception catching to the photo endpoint, for cases where conversion fails (we just had one case of RGBA to JPEG didn't work).
- Legacy-Id: 18697
2020-11-16 07:55:18 +00:00
Henrik Levkowetz 0d001481e8 Added better guards against passing empty data to the person profile template.
- Legacy-Id: 18623
2020-10-20 12:35:05 +00:00
Henrik Levkowetz 07be1f8516 Added a view to retrieve profile photos, in order to support Meetecho's need for such, at /person/{email}/photo. The default is to supply images with 80px width. Image scaling is available using the same query argument as Gravatar: ?size=200 or ?s=200 for 200-pixel wide images.
- Legacy-Id: 18483
2020-09-10 21:41:01 +00:00
Henrik Levkowetz 06fa5e517a Adjusted the code to the changed signature of admin.utils.get_deleted_objects()
- Legacy-Id: 18053
2020-06-24 20:39:27 +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 0ca9ec769c Added a None guard for the person merge last_login date comparison. Fixes issue #2562
- Legacy-Id: 15418
2018-07-30 16:57:59 +00:00
Ryan Cross 85f4861f9f Add view for merge person records. Commit ready for merge.
- Legacy-Id: 14862
2018-03-18 18:01:56 +00:00
Henrik Levkowetz 236fb3e185 Make it possible to merge nominations with inactive email addresses in the Nominee Merge form.
- Legacy-Id: 12091
2016-10-05 17:03:31 +00:00
Henrik Levkowetz 03d5b07e51 Added document information and submission timeline to profile pages. Refactored the chart data generation.
- Legacy-Id: 11928
2016-09-06 19:25:51 +00:00
Henrik Levkowetz 80dc67f109 Fixed pyflakes and consistency issues in person.views.profile().
- Legacy-Id: 11322
2016-06-11 23:05:08 +00:00
Henrik Levkowetz 8ba02dfd2c Added fixes for various profile page problems found by the test crawler.
- Legacy-Id: 11321
2016-06-11 21:54:14 +00:00
Henrik Levkowetz c4b59f0363 Added personal photo+bio pages.
- Legacy-Id: 11278
2016-06-05 20:14:50 +00:00
Ole Laursen cebc979282 Summary: Resolve person/email/document multiselect issue by importing
select2 and switching the widgets over to using that. Port the
milestones editing page to Bootstrap.
 - Legacy-Id: 8713
2014-11-25 16:47:48 +00:00
Ole Laursen 1aafd73ec1 Make the meeting session request tool use a Person field rather than
one operating on Email, also fix a couple of bugs in the Person branch
of the tokenized autocompleting field
 - Legacy-Id: 8283
2014-08-19 08:18:17 +00:00
Ole Laursen 92e5694ed3 Revamp the AutocompletedEmailsField API a bit to allow for an AutocompletedPersonsField
- Legacy-Id: 8282
2014-08-18 13:55:43 +00:00
Ole Laursen baab85b6b5 Make the EmailsField search a bit more intelligent by tokenizing the
input values so that a search for John Doe matches John M. Doe too
 - Legacy-Id: 8278
2014-08-17 16:08:12 +00:00
Ole Laursen a5e1586433 Add option (default set to true) to EmailsField to require that the
email addresses have associated Datatracker accounts - this takes
effect immediately for the JS auto-complete thing, but the actual
validation afterwards doesn't actually require it yet (check commented
out for the time being), as it appears there are still a few people
without accounts in active groups
 - Legacy-Id: 8277
2014-08-17 15:39:22 +00:00
Ole Laursen 9e9ec98206 Moved EmailsField from person.forms to person.fields
- Legacy-Id: 8269
2014-08-14 08:03:11 +00:00
Ole Laursen 25cdc289e0 Search emails over email address too in addition to person names
- Legacy-Id: 8266
2014-08-13 10:24:12 +00:00
Henrik Levkowetz df432f8888 Made ietf/person pyflakes-clean. Fixed a bug where Person.role_email() might blow up if given a group parameter.
- Legacy-Id: 7477
2014-03-15 19:37:25 +00:00
Ole Laursen 84a9f49053 mimetype -> content_type (mimetype is deprecated)
- Legacy-Id: 6945
2013-12-16 16:53:47 +00:00
Adam Roach 2e740dcab8 Two changes: (1) searches by substring rather than
"begins with" (to allow, e.g., searching by last name);
and (2) limits results to 10 entries (to limit server
load and limit effectiveness of email-scraping attacks)
 - Legacy-Id: 5519
2013-03-09 19:34:11 +00:00
Ole Laursen 32659ed957 Move AJAX person search to person/ with some support form code.
- Legacy-Id: 4168
2012-03-22 18:22:00 +00:00