Commit graph

44 commits

Author SHA1 Message Date
Sangho Na 9d583ab9eb
fix: Use email or name when building community list view (#7203)
* fix: Use email or name when building community list view

instead of email

* test: add test case

* chore: remove debug

* fix: use name in community list menu when no active email is found

---------

Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
2024-09-16 10:06:16 -05:00
Jennifer Richards 3157cf65d1
fix: Accept&ignore group_type for some views 2024-02-12 17:38:36 -04: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
Robert Sparks 4946430159
chore: checkpoint: halfway through removing docalias 2023-08-15 09:11:53 -05:00
Jennifer Richards 48d4072eeb
Merge branch 'feat/rfc' into main-merge
# Conflicts:
#	ietf/doc/factories.py
#	ietf/doc/tests_status_change.py
#	ietf/name/fixtures/names.json
#	ietf/templates/doc/document_info.html
2023-08-03 18:34:06 -03:00
Ali e61f779816
fix: avoid deprecation warning on view_list() for objs without CommunityList
Fixes #5942
2023-07-23 09:12:13 -07:00
Jennifer Richards 938f862cc2
refactor: Prevent undefined variable reference 2023-07-22 14:11:57 -07:00
Jennifer Richards 075aed7e9a
refactor: Replace deprecated request.is_ajax() 2023-05-12 18:26:56 -03:00
Jennifer Richards ebebdbed3e
refactor: replace datetime.now and datetime.today with timezone.now (#4211)
* refactor: replace datetime.now with timezone.now

* refactor: migrate model fields to use timezone.now as default

* refactor: replace datetime.today with timezone.now

datetime.datetime.today() is equivalent to datetime.datetime.now(); both
return a naive datetime with the current local time.

* refactor: rephrase datetime.now(tz) as timezone.now().astimezone(tz)

This is effectively the same, but is less likely to encourage accidental
use of naive datetimes.

* refactor: revert datetime.today() change to old migrations

* refactor: change a missed datetime.now to timezone.now

* chore: renumber timezone_now migration

* chore: renumber migrations
2022-08-25 13:45:16 -03:00
Lars Eggert beab785903
fix: Remove unicode encode from CVS row writer (#4294)
Fixes #4292
2022-08-02 10:23:53 -05:00
Jennifer Richards 17d37723f7 Consolidate repeated searchable field code into SearchableField class. Fix single-valued searchable fields. Make javascript test config reusable. Use Django Form.media for JS/CSS inclusion. Fixes #3196, #3204. Commit ready for merge.
- Legacy-Id: 18939
2021-04-09 15:18:11 +00: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 57938b039d Converted many cases of plain-text 403 messages to use a properly styled page instead, with a login link when appropriate. Also changed some API endpoint 400 responses to a more correct 403.
- Legacy-Id: 18339
2020-08-06 10:59:52 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz e9a37d8ac8 Removed six.text_type(), changed six.moves.urllib to plain urllib, and removed now unused six imports.
- Legacy-Id: 17385
2020-03-05 14:41:41 +00:00
Henrik Levkowetz b873af1eac Merged in [16583] from rjsparks@nostrum.com:
Restore ability to remove documents while managing a personal list. Required updating code to match the recent change to Document's primary key. Fixes #2757.
 - Legacy-Id: 16608
Note: SVN reference [16583] has been migrated to Git commit 821609888a2c8a6db67867dd334103b034157d20
2019-08-01 14:27:00 +00:00
Henrik Levkowetz e03784132d Merged changes from current trunk to Py3 branch.
- Legacy-Id: 16468
2019-07-16 15:36:16 +00:00
Henrik Levkowetz bdc73e771a Python2/3 compatibility: replaced six.ensure_text() with either six.text_type or django's force_text(), depending on the case, and fixed a variable scope issue.
- Legacy-Id: 16461
2019-07-16 13:20:05 +00:00
Henrik Levkowetz 8c6eb3a30a Python2/3 compatibility: Changed the use of open() and StringIO to io.open() etc.
- Legacy-Id: 16458
2019-07-15 19:14:04 +00:00
Henrik Levkowetz 0ef7e98e0a Corrected the content type for some JSON responses.
- Legacy-Id: 16409
2019-07-07 12:39:22 +00:00
Henrik Levkowetz 9decae5e7e Fixed changed object attributes for UUID objets.
- Legacy-Id: 16327
2019-06-28 20:49:03 +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 f5f838ddf8 Added guards against duplicate m2m entries.
- Legacy-Id: 16304
2019-06-25 11:01:25 +00:00
Henrik Levkowetz 426870b766 Merged in the Document and DocAlias primary key change and m2m work in ^/personal/henrik/6.96.1-docalias.
- Legacy-Id: 16261
2019-06-15 12:00:48 +00:00
Henrik Levkowetz 815602351f This is a series of 50 migrations that changes the Document and DocAlias
primary keys from character strings to integers, and makes corresponding code
changes.

This was prompted by database limitations discovered when trying to make
DocAlias use a m2m document field; with 255 long strings as primary keys for
Document and DocAlias this violated the MySQL database limitations.

Changing the primary keys to integers should also improve efficiency.  

Due to the data migrations which create the new integer primary keys and adds
corresponding integer foreign keys matching the previous string foreign keys
in all tables having foreign keys to Document and DocAlias, some of these
migrations take a long time.  The total set of migrations are expected to have
a runtime on the order of 2 hours.
 - Legacy-Id: 16237
2019-06-10 11:32:46 +00:00
Lars Eggert 8a70e9773d Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
- Legacy-Id: 13112
2017-03-25 19:16:45 +00:00
Ole Laursen c7589f9b6a Integrate community lists for groups with the existing group documents
page. Each WG/RG now gets a list with an initial set of rules to
populate the list.

Refine the community list management interface a bit to support the
group lists better - group lists aren't connected to the usual track
icons so need to be able to add/remove individual drafts.

Change the "name contains" rule to support regular expressions to
enable each group to have a default replacement for the previously
implemented "related documents" search. Maintain a materialized view
of the regexp-matched drafts with a call in the submit code to avoid
having to scan all drafts/~1000 group rules all the time.
 - Legacy-Id: 10963
2016-03-22 12:48:44 +00:00
Ole Laursen cdcad43fc0 Simplify community lists further by letting email subscriptions reuse
the existing infrastructure for accounts and emails, instead of a
having a separate confirmation step
 - Legacy-Id: 10951
2016-03-17 12:02:45 +00:00
Ole Laursen 5f4082d595 Overhaul of the community list code.
From a user perspective: Use friendlier URLs for lists. Reuse the
search results table for displaying lists. Simplify the management
pages and improve the search rule UI to help fill in the values and
validating them, instead of just providing a text field. Fixes #1874.
Add an explicit button for adding individual documents. Include all
changes in the document change streams, not just some changes. Fix a
concurrency issue that allows changed documents to escape the search
rules. Don't create an empty list just be logging in.

From a code maintenance perspective: Clean up the models. Replace the
background caching scheme with direct queries. Get rid of a big chunk
of code. Speed up the code that adds track buttons to search results.
Add tests of all community views. Fixes #1422. Also fix some minor
bugs and oddities here and there.

There's still some work to do with respect to integrating the group
lists better.
 - Legacy-Id: 10921
2016-03-14 10:44:57 +00:00
Ole Laursen cd5c60ccf1 Clean up permission checking in community lists, fix split in
track/untrack between personal/group lists, get rid of remove_document
 - Legacy-Id: 10680
2016-01-13 17:37:22 +00:00
Ole Laursen 4696dad536 Delete some unused code
- Legacy-Id: 10669
2016-01-13 10:53:28 +00:00
Ole Laursen e807115e81 Fix community list track/untrack to use POST rather than GET
- Legacy-Id: 10660
2016-01-13 10:15:38 +00:00
Henrik Levkowetz acc2c59920 Updated a bunch of links from http: to https: based on a patch from lars@netapp.com.
- Legacy-Id: 9556
2015-04-24 21:47:12 +00:00
Shane Kerr 4d71417817 Untrack this document button added to draft document view.
- Legacy-Id: 8130
2014-07-19 19:44:30 +00:00
Henrik Levkowetz 5bef5d11ae Made doc/ pyflakes-clean.
- Legacy-Id: 7462
2014-03-15 16:09:47 +00:00
Ole Laursen 84a9f49053 mimetype -> content_type (mimetype is deprecated)
- Legacy-Id: 6945
2013-12-16 16:53:47 +00:00
Ole Laursen 6a98fec2c3 Use built-in json module in Python instead of simplejson bundled with Django
- Legacy-Id: 6883
2013-12-11 16:59:19 +00:00
Markus Stenberg 0d5a505697 Addressed #1074 - approved by mr. Kivinen.
- Legacy-Id: 6627
2013-11-02 22:13:43 +00:00
Jim Schaad a18bebe7bd Make sure that the same rule cannot be entered twice in a community list.
As part of this fix, you need to do the following:
1.  Eliminate duplicates currently in the data base.  This statement can be used to identify them.

SELECT e1.id id1, e2.id id2, e1.community_list_id, e1.rule_type, e1.value FROM ietf_utf8.community_rule e1 JOIN ietf_utf8.community_rule e2 ON (e1.id != e2.id AND e1.community_list_id=e2.community_list_id AND e1.rule_type=e2.rule_type AND e1.value=e2.value);

2.  Delete any current duplicate lines in the text.  This uses the following commands as of the check-in

DELETE FROM TABLE ietf_utf8.community_rule WHERE id=19 OR id=91 OR id=177

3.  Add a constraint to the table so that it will enforce the rule itself

ALTER TABLE ietf_utf8.community_rule ADD CONSTRAINT pc_CommunityRule UNIQUE (community_list_id, rule_type, value)
 - Legacy-Id: 5426
2013-02-09 18:09:33 +00:00
Jim Schaad cb1593d6a2 Modify atom change feed so that
1.  It returns the last 14 days of changes rather than the last 20
2.  Change the atom template so that it has correct time offsets rather than saying that PST and UTC are the same
3.  Change the atom template so that it uses content rather than summary and return HTML content with line breaks as needed.
 - Legacy-Id: 5425
2013-02-04 17:45:03 +00:00
Henrik Levkowetz c8af089ab1 Fix a bug which made the community tracking code crash when search results would show an old RFC without an associated draft.
- Legacy-Id: 4569
2012-07-03 13:46:23 +00:00
Henrik Levkowetz 36387810a7 New schema models have moved from redesign/ to ietf/; fix community sources accordingly.
- Legacy-Id: 4522
2012-06-27 08:38:55 +00:00
Henrik Levkowetz 89ac692442 Added in the community app, which wasn't included properly in the previous commit.
- Legacy-Id: 4519
2012-06-27 08:26:18 +00:00