Граф коммитов

490 Коммитов

Автор SHA1 Сообщение Дата
Mathieu Pillard c3ca15835f
Query iprepd for email and ip restrictions on top of our own (#11613)
Query iprepd for email and ip restrictions on top of our own
2019-06-11 17:35:27 +02:00
Mathieu Pillard 6a0c591483
Merge pull request #11588 from diox/abuse-admin-links
Fix links used in abuse report admin tool to be absolute
2019-06-07 12:34:37 +02:00
Andreas Wagner 20d97a27ab
Keep IP when banning user 2019-06-06 13:13:19 +02:00
Mathieu Pillard 99bb89783b Fix links used in abuse report admin tool to be absolute
The admin lives on an instance that doesn't support the rest of the
app so any links pointing to outside the admin need to be absolute.
2019-06-06 13:03:17 +02:00
Mathieu Pillard a391064a8d
Prevent adding new author to an add-on if its email is restricted (#11556) 2019-06-03 12:14:27 +02:00
Mathieu Pillard 20ed9133ed Require users to set a display name when validating developer agreement 2019-05-31 13:52:25 +02:00
Mathieu Pillard 9d58c52849 Give access to ip network/email restrictions to advanced admins and fix __str__ 2019-05-23 09:39:18 +02:00
Christopher Grebs 011cc130e2
Rework email blocking to allow blocking whole domains too. (#11483)
* Rework email blocking to allow blocking whole domains too.

This works very basically also for subdomains.

This doesn't support wildcards.

Fixes #11442

* Use fnmatch to match on glob-style patterns.

Fixes #11484

* Fix tests and flake8

* Rename domain_pattern to email_pattern as that fits better.

* just change the email column

* Fix migration number

* fix admin
2019-05-22 20:10:55 +02:00
Mathieu Pillard b8fffcca8e Restrict submissions per user email or IP
This forces restricted users (from their email or current IP) to go to the
developer agreement page when they want to use the submission flow. When
the agreement page is submitted, they'll be shown a message depending on
the reason behind the restriction.

A new API permission is also added that completely prevents the signing API
from allowing requests from such restricted users, with the corresponding
message returned as well.
2019-05-21 15:40:36 +02:00
Christopher Grebs 458af2d55a
First part of adding user restriction model and basic admin. (#11465)
* First part of adding user restriction model and admin.

This adds a `UserRestriction` model that allows admins to add
restrictions based on ip-address, cidr network or email.

The admin is currently very basic and will most certainly be improved
over time.

Fixes #11440 (already contains CIDR support)
Refs #11442 (missing email domain support, going to push that in a
follow-up)

* Split up user restriction checkers. Add actual allow_* implementation and tests

* Improve tests, fix /32 blocking

* Merge IPAddressUserRestriction and IPNetworkUserRestriction
2019-05-20 15:59:22 +02:00
Mathieu Pillard 6ac30c699b
Make Abuse Report Admin search depend on report type being searched (#11438)
Make Abuse Report Admin search depend on report type being searched
2019-05-20 10:38:32 +02:00
Andrew Williamson c3a658b4c6
optimize bulk user banning (#11388) 2019-05-14 17:01:38 +01:00
Andrew Williamson 7629b2f4c0
replace mock dep with native unittest.mock (#11313) 2019-05-03 14:31:44 +01:00
Andrew Williamson 665d45df3d
STATUS_PUBLIC to STATUS_APPROVED (#11249) 2019-04-25 20:58:03 +01:00
Mathieu Pillard 7d9134de25 Fix ban_action permission check in user admin
We should never hit that code in real life for now, as you need Users:Edit
permission to see the list anyway, but this was wrong. (There is an
additional permission check in the method itself so there wasn't any
security risk)
2019-04-23 16:47:58 +02:00
Andrew Williamson 6808451b25
remove legacy unsubscribe page + other users app clean-up (#11214) 2019-04-18 12:43:10 +01:00
Mathieu Pillard 8105d68ce4 Don't make extra SQL queries when calling is_superuser multiple times 2019-04-16 15:20:45 +02:00
Andrew Williamson 640f9696b3
drop legacy home view (#11148) 2019-04-04 19:57:20 +01:00
Mathieu Pillard 968ec0b5e9
Remove obsolete management commands / tasks (#11145)
- approve_addons (made obsolete by auto_approve)
- award_post_review_points (one-off)
- commentlog (one-off)
- migrate_abuse_reports_to_country_code (one-off)
- process_addons --task=bump_appver_for_legacy_addons (one-off)
- process_addons --task=disable_legacy_files (one-off)
- process_addons --task=migrate_legacy_dictionaries_to_webextension (one-off)
- process_addons --task=remove_amo_links_in_url_fields (one-off)
- search_platforms (one-off)
- update_deleted_users (one-off)
- versionlog (one-off)
2019-04-04 16:31:28 +02:00
Andrew Williamson fe7ebc484d
have get_absolute_url be absolute, and return an external site url (#11032) 2019-04-04 11:07:38 +01:00
Mathieu Pillard 49ffbfb213
Merge pull request #11088 from diox/reviewer-alias
Add reviewer name alias for reviewers to hide their actual name
2019-04-03 13:02:10 +02:00
Mathieu Pillard 90c8201eb9 Add reviewer name alias for reviewers to hide their actual name
It's used when exposing reviewer name to developers for reviewer
actions - regular actions still use the normal name, even when
made by a reviewer.
2019-04-01 13:07:12 +02:00
Andrew Williamson 01f267050b
rm all the legacy addon views (#11086) 2019-04-01 11:02:38 +01:00
Andrew Williamson abe16fed54
restore widget_attrs for UserEmailField (+rename) (#10915) 2019-03-12 12:57:57 +00:00
Andrew Williamson 69d43bb369
More django2.2 fixes (#10793) 2019-03-07 17:39:28 +00:00
Andrew Williamson 74794d9db5
rm /users/views.py etc (#10833) 2019-03-05 09:58:09 +00:00
Andrew Williamson 20328da9e4
frontend has the user admin edit url in a slightly different location (#10829) 2019-03-04 09:46:16 +00:00
Shivam Singhal 3f247f4d41 Update django-multidb-router terminology (#10773) 2019-03-01 10:37:13 +00:00
Andrew Williamson 32e546c7c0
move olympia logout page to devhub; remove login/register views (#10686) 2019-02-18 17:21:45 +08:00
Mathieu Pillard a3e12790e3
Merge pull request #10696 from diox/point-my-collections-legacy-link-to-new-url
Point My Collections to the collection homepage for frontend compat
2019-02-15 17:03:32 +01:00
Shivam Singhal 600fe38b5a Remove sdk based addons notifications code (#10568) 2019-02-15 22:46:31 +08:00
Mathieu Pillard f2c4c16c8d Point My Collections to the collection homepage for frontend compat
The individual collection pages no longer exist in the new frontend,
so we need this link to point to something that does and this is the
one that makes the most sense.
2019-02-15 15:44:37 +01:00
Andrew Williamson cd57dee443
django2.2 changes and deprecation removals (#10700) 2019-02-15 22:41:03 +08:00
Andrew Williamson b25df7e852
address django2 feature removals (#10691) 2019-02-14 18:31:46 +08:00
Andrew Williamson a0a35a1fe5
address (mainly django) deprecation warnings (#10667) 2019-02-12 21:03:16 +08:00
Mathieu Pillard 5fae59878d Fix RemovedInDjango21Warning: Add the renderer argument to the render() method 2019-02-05 18:15:22 +01:00
Andrew Williamson ade65418e7
Fix /users tests (#10450) 2019-01-19 00:13:30 +08:00
Christopher Grebs c97fdc3af1
Use a temporary 302 redirect in LocaleAndAppURLMiddleware. (#10447)
Fixes #10444
2019-01-18 12:28:18 +01:00
Andrew Williamson 791f6bea4c
various python3 related fixes (#10435) 2019-01-17 22:45:06 +08:00
Mathieu Pillard 6204704e23 Replace __unicode__ with __str__, using @python_2_unicode_compatible where needed 2019-01-17 11:50:55 +01:00
Andrew Williamson 96d87a9391
drop username editing (#10329) 2019-01-09 19:18:03 +08:00
Mathieu Pillard dcda1977fc Replace iter* with six.iter* for Python 3 compat 2019-01-08 14:39:49 +01:00
Mathieu Pillard 8a6bc453c6 Replace usage of StringIO with six.StringIO for Python 3 compat 2019-01-08 14:27:40 +01:00
Mathieu Pillard f79652d396 Fix pep8 issues following Python 3 compat commits 2019-01-08 13:40:51 +01:00
Mathieu Pillard 1caa3440cc Replace usage of xrange() by range() for Python 3 compat 2019-01-08 13:40:51 +01:00
Mathieu Pillard 521945867e Replace reduce by functools.reduce for Python 3 compat 2019-01-08 13:40:51 +01:00
Mathieu Pillard d046261151 Replace usage of `basestring` with `six.string_types` for Python 3 compat 2019-01-08 13:40:51 +01:00
Mathieu Pillard 9cfd298284 Replace usage of `unicode` with `six.text_type` for Python 3 compat 2019-01-08 13:40:50 +01:00
Mathieu Pillard 70760159c3 Replace urlparse imports by six.moves.urllib_parse for Python 3 compatibility
This keeps backwards-compatibility to Python 2 but moves us closer to running
with Python 3.
2019-01-07 17:43:17 +01:00
Andrew Williamson 3258a760dc
display_name limited to between 2 and 50 characters (#10270) 2019-01-02 23:14:27 +00:00
Andrew Williamson f9eb5f9a63
always use UserProfile.name to get always get a name (display_name can be '') (#10264) 2019-01-02 10:48:28 +00:00
Andrew Williamson dd733fe76c
stop using username as a fallback when display name isn't set (#10262) 2019-01-02 10:15:48 +00:00
Andrew Williamson f6b7fd42b4
stop using usernames in collections too (#10173) 2018-12-07 11:39:45 -05:00
Andrew Williamson 438439b705
use UserProfile.id in urls rather than username (#10103) 2018-11-28 15:47:26 +00:00
Christopher Grebs 83f1b2707d
Merge pull request #10042 from mozilla/8602-use-memcached-by-default-in-tests
Enable memcached by default for tests. Upgrade python-memcached
2018-11-21 19:29:36 +01:00
Christopher Grebs 2c82ea7728
Enable memcached by default for tests. Upgrade python-memcached
* Adds a test to test unicode support for latest python-memcached
  versions
* Configures caches key prefix so that tests don't conflict with each other
* Remove a few cache.clear calls with `cache.delete` calls that avoids
deleting all memcached entries while other tests are running
* Remove zadmin.memcached as it's crazy dangerous, such power should
only be wielded by ops-folks who wake up at night when pressed
* Fixes waffle helpers to call .flush() to flush appropriate caches

This also fixes how parameters are forwarded to memcached and fix KEY_PREFIX initialization

We are now making sure parameters from `settings.CACHES` are properly forwarded
to the actual cache backend (now memcached). These errors were not seen
since LocMemCache didn't require any parameters.

The `KEY_PREFIX` setting is set to a uuid instead of the xdist-slaveid to
ensure test functions are properly isolated from each other.

`cache.clear` is not called anywhere unless absolutely necessary to reduce
the side-effects of our test-setup.

Fixes #8602
2018-11-21 18:26:30 +01:00
Mathieu Pillard a23f38ed36 Expose more info about ratings in admin, allow admins to delete them 2018-11-21 14:01:04 +01:00
Christopher Grebs 8d4d9504b2
Remove 'activate-basket-sync' waffle switch and implementation
Fixes #10025

This doesn't touch how notifications are synced to `UserNotification`
instances but only uses basket always.
2018-11-20 09:22:12 +01:00
pyup.io bot 60dd98e48f Update flake8 to 3.6.0 (#9795) 2018-11-05 12:39:42 +00:00
Andreas Wagner 55323c43a9
Accept multiple ids when searching for user 2018-10-28 15:29:47 +00:00
Andrew Williamson 534e8f56f9
unsigned, PositiveAutoFields (#9377) 2018-09-24 07:47:03 +01:00
Christopher Grebs 92e9fb2aed
Fix deprecation warnings (Django 2.x, DRF etc) (#9431)
This should fix most of our current Django 2.x and DRF deprecation warnings that we see during test runs.

* Uses `remote_field.model` in amo/utils instead of `remote_field.to`
* Uses `is_anonymous` and `is_authenticated` as properties instead of functions
* Replaces drf `@detail_route` with `@action(detail=True)`

Fixes #9432
2018-09-17 09:24:14 +02:00
Yash Sharma 38490d351e Making e-mail restrictions case insensitive (#9426)
Make @mozilla.com|org guids restriction case-insensitive
2018-09-14 22:55:12 +02:00
Mathieu Pillard 9e1bfea859 Add @mozilla.com to the list of add-on guids restricted to mozilla users 2018-09-04 17:49:53 +02:00
Benjamin Forehand Jr 80bbc69dfd
Added configuration to run multiple ui tests in parallel. (#9266)
* Changed fxa account generation to allow assigning an fxa ID to a created user.
* Moved pytest execution to makefile to access variables.
* Removed second login tests as the devhub tests also log in.
2018-08-28 14:48:35 -04:00
Yash Sharma 78bc6607b9 Use Firefox user instead of Anonymous user when user doesn't have a display name 2018-08-27 20:05:37 +05:30
Mathieu Pillard c09a7fc1ae Allow users with Admin:Advanced to delete users with relations to other models
Note that the behaviour depends on which model is affected - some are kept,
others are deleted because of UserProfile.delete_or_disable_related_content().
2018-08-21 14:57:10 +02:00
Mathieu Pillard d1a5fe81fb Make sure last_login and last_login_ip are always set (#9120)
- Refactor auth register and login to *both* send `user_logged_in` signal
- Use that signal to set `last_login_ip` (django uses it to set `last_login`)
- Also send that signal when authenticating through JWT tokens
- Deprecate the `*_attempt` fields that no longer make sense with FxA auth

Fix #7333
2018-08-14 08:02:14 +02:00
Mathieu Pillard 060b4a01e2 Redirect legacy login page to URL passed in query if authenticated 2018-08-08 16:03:02 +02:00
Mathieu Pillard d3e7c31caf Fix test broken by listed_authors transformer change 2018-08-02 16:32:05 +02:00
Mathieu Pillard 0ab1a95f5d
Merge pull request #9000 from diox/remove-update-collections-votes
Remove more obsolete collection features: stats, downloads, watchers & votes
2018-07-30 13:56:36 +02:00
Mathieu Pillard eba5e64422 Remove more obsolete collection features: stats, downloads, watchers & votes. 2018-07-30 13:39:38 +02:00
Mathieu Pillard c34bdab7e4 Work around string extraction issue in user admin 2018-07-23 12:24:52 +02:00
Benjamin Forehand Jr cafc5d0519
Add UI devhub login and upload tests (#8559)
* Added devhub login and upload tests.
* Add ui-test webext.
* Remove management commands.
2018-07-13 08:55:40 -04:00
Andrew Williamson fc73214810
count static themes as themes too (#8870) 2018-07-13 13:30:38 +01:00
Andrew Williamson 1accc2b18c
don't try to include set notifications from the db that don't exist anymore. (#8871) 2018-07-13 12:37:19 +01:00
Christopher Grebs 7407b70aa2
Update to Django 1.11 (#8738)
Port code and tests to Django 1.11.

* Update requirements to Django 1.11.14, remove session_csrf
* Use --run-syncdb for migration calls
* Remove unused setup-docker script
* Port code and tests to Django 1.11.
* Remove django-session-csrf everywhere, it got replaced by django's own
  session csrf protection
* Make sure we are calling `client.get()` with `follow=True` where necessary
* Replace django.core.urlresolvers import with django.urls
* Port custom `IconWidgetRenderer` to Django 1.11 as `IconTypeSelect`
* Properly use `_queryset_class` for custom manager classes
* Make use of `base_manager_name` on our models `Meta` instead of `use_for_related_objects`
  on the manager where appropriate. This is required to make translations, soft-delete
  and more work. See comment on Addons.Meta for more details.
* Various fixes along the way to make tests work
* Port form errors for locale editing forms to Django 1.11 and make use of
  form.add_error instead of our own custom process
* Mark TestDetailPage.test_304 as xfail for now, somehow Etags seem to be broken
  for that view during tests but work fine in manual tests
* Fix amo.celery, we cannot have any imports at the module-level that may
  import the ORM
* Fix global_settings context processor for 500-server error cases
* Fix `changed_data` handling in `AMOModelForm`
* Remove `queryset_transform` and implement it directly in amo/models
* Fix pagination, Django changed how `num_pages` work and how `count` can be overwritten
* Add a new test that tests database transforms as `BaseQuerysetTestCase`
* Make sure `legacy_redirect` only appends `?` if there are actual GET parameters
* Re-implement `LicenseRadioChoiceInput` as `LicenseRadioSelect` which is now Django 1.11 compatible
* Remove our custom `form_kwargs` uplift from Django 1.9
* Correct how we're using `Category.objects.create` and only pass `db_name` instead of `name`, previously
  this didn't error but now it (luckily!) does
* Update `FileSelectWidget` to correctly work with Django 1.11, use custom rendering
* Fix decorator ordering for `files.views:browse`
* Update database settings to correctly use `TEST` object
* Fix `select_related` call in `RatingViewSet`
* Remove custom `DateTimeCast` implementation
* Fix `addon_factory` calls in `reviewers/tests/test_views.py` to correctly set
  `is_webextension`
* Port our `TranslationDescriptor` and `TranslatedField` to Django 1.11. Also, make sure form error handling works
* Add a new test that checks that `default=None` is a valid setting for translation fields
* Add a new test that checks that translations from related fields are correctly fetched
* Remove possible ambiguity from translations `TestWidget` tests
* Make sure that the correct `MEDIA_URL` is set in `TestDownloadsUnlistedVersions` to fix
  external cdn tests

* Remove custom happyforms code. Django cleans text fields now by default
* Move translations app to the top of INSTALLED_APPS, add a lengthy comment
* Pass additional arguments to contribute_to_class, fix smaller nits
* Set MEDIA_URL and STATIC_URL to an external value by default. That's how they're configured in dev, stage and prod anyway.

Please note that we didn't replace all our custom form rendering with proper templated widgets yet. This will
happening in some follow-up work.

Fixes #5271, Fixes #1569
2018-07-11 06:56:54 +02:00
lavish205 0aad639ef4 Fixed #8644: Unify @write and @use_master into one @use_primary_db decorator 2018-07-09 18:07:05 +05:30
Andreas Wagner c1f35fbefb
Add link to admin userprofile on admin membership page 2018-07-02 19:56:11 +02:00
Mathieu Pillard 8c03d67bba Add actions to the user admin (delete picture, ban user, delete user)
This in turns means adding the notion of banned users and preventing
them from logging on. They are just deleted users for which we keep
the email and fxa_id.
2018-06-29 12:54:03 +02:00
Mathieu Pillard 401a073f38 Enable session key rotation for django authentication 2018-06-28 13:44:24 +02:00
Mathieu Pillard 1205979db9 Rename UserProfile reviews property to ratings 2018-06-28 13:44:24 +02:00
Christopher Grebs ceae9d4fd0
Remove cache machine (#8606)
Fixes #7743
2018-06-28 13:20:06 +02:00
Christopher Grebs aaf9bf7689
Backport Django 1.11 cache.get_or_set (#8549)
Part of our upgrade to Django 1.11, this is backporting functionallity
we'd like to use after the upgrade already to our current code so that
we can find potentially drawbags early.

This also reduces our reliance on cache-machine which helps removing it.

This also few smaller optimizations along the way:

 * denied-name blocklists were cached language-dependend although they're not, this now increases the chance of cache-hits instead of misses
 * the django cache.get_or_set implementation fixes potential
 race-conditions between multiple requests setting data

Fixes #8529
2018-06-19 09:24:31 -07:00
Christopher Grebs a3b9bcd009
Remove template fragment caching. (#8461)
* Remove template fragment caching.

* Removes template fragment-caching completely
* Adds a few performance optimizations, backported from #8435
* Removes the globally available `ADMIN_MESSAGE` and explicitly fetches
it in our base template. That way we don't call zadmin.get_config on
every template-render needlessly
* Improved developer-status querying, merged the caching from is_developer, is_addon_developer, and is_artist

Fixes #8460

* Actually remove amo.ext module.

* Revert not fully-completed addons_with_authors rework

* Fix comment
2018-06-12 23:05:38 +02:00
Andrew Williamson 7befdbaefc
Update text on legacy profile page to indicate how emails can be changed. (#8466) 2018-06-08 09:30:48 +01:00
Andrew Williamson ddc71a8128
Only return dev notifications for addon developers. (#8427) 2018-06-05 12:38:19 +01:00
Andrew Williamson b457a5cece
some py3 friendly syntax changes (#8372) 2018-05-30 11:29:13 +01:00
Christopher Grebs 1527d1542f
Add optin and source_url parameters to basket integration. (#8363)
* Add optin and source_url parameters to basket integration.

Fixes #8320

* Make request optional
2018-05-29 13:08:31 +02:00
Mathieu Pillard 6e2e1a61c1 Fix update_user_ratings_task() (it can receive rating as a string) 2018-05-28 18:48:09 +02:00
Mathieu Pillard 410e714083
Merge pull request #8335 from diox/user-admin
Expand the user admin with more information, give access to people with Users:Edit
2018-05-25 15:39:55 +02:00
Mathieu Pillard 75a24cc23a Expand the user admin with more information, give access to people with Users:Edit 2018-05-23 19:49:21 +02:00
Mathieu Pillard 1bb9e43dae Always display notification state from basket, don't trust our own data
2 things were wrong here:
- We didn't use basket data if the state was 'unsubscribed'
- We didn't check against the basket_id so the if was never True

The form had both mistakes, the API only the second one.
2018-05-23 19:26:31 +02:00
Mathieu Pillard cea8a9c2ee
Switch celery task serialization from pickle to JSON (#8178)
Switch celery task serialization from pickle to JSON
2018-05-23 14:42:29 +02:00
Mathieu Pillard 7e3f9db93c Let basket exceptions be raised and subscribe synchronously
Swallowing basket errors or letting it do async calls is
dangerous for us, because the user is not aware if something
went wrong. Better for them to get a 500 page if things are
not working properly.
2018-05-21 19:36:35 +02:00
Christopher Grebs a27d4116b4
Fix user deletion to not generate a potentially used username
Fixed #8289
2018-05-17 20:19:18 +02:00
Christopher Grebs 7d7375bd62
Fix basket integration for unknown users. (#8283)
* Fix basket integration for unknown users.

Fixes #8281

This also removes the orphaned sync_user_with_basket task. We do that
synchronisation on-demand and during the request when a user calls
it's user profile page.

* Return empty list and don't return empty tuple when sync on unsubscribe didn't work
2018-05-17 13:35:06 +02:00
Shivam Singhal a1db1e4871 Fix: Removing notifycompat & notifyevents (#8258) 2018-05-16 19:01:26 +01:00
Christopher Grebs 328da3ea67
Clear more personal data on user deletion. (#8225)
* Clear more personal data on user deletion.

Fixes #8223

* Fix failing test thanks to modified fixture data

* Also delete photos on user deletion.

Fixes #8222

* Add a command that re-calls user.delete() on all deleted users.

* No need anymore to name the task explicitly

* Fix flake8, correctly delete user-images in case of hard delete

* Fix docstring
2018-05-14 11:56:03 +02:00
Christopher Grebs 1500c53305
Implement basket <-> amo newsletter sync (#8174)
* Implement basket <-> amo newsletter sync.

* Adds basket-client dependency
* Refactors users.notifications to allow for remotely-managed
  notification types
* Implement helpers to fetch, subscribe and unsubscribe from newsletters
* Update user profile editing form to fetch and save to basket
* Update accounts/notifications endpoint to fetch and save to basket
* Implement a sync_basket command that fetches basket tokens
asynchronously for all users

All this is behind a waffle flag.

Fixes #7808

* Switch to 100% synchronous basket requests again

* Fix accounts view test to use the conftest configured token

* Fix typos and comments

* Put basket integration behind waffle flag

* Fix typo

* Fix tests

* Remove sync_basket command

* Fix flake8
2018-05-09 17:53:35 +02:00
Benjamin Forehand Jr 2244f9ae10
Added option to add an fxa account id to a super user on creation. (#8161)
* Added option to add an fxa account id to a super user on creation.
2018-05-04 11:02:22 -04:00
Christopher Grebs 6a8fc341da
Remove cache-machine helpers, switch to django cache backends (#8122)
* Implement cache request tracking, add zadmin config tests.

Implements CacheStatTracker as a backend for tests to allow us to use
`assert_cache_requests` in tests.

* implement a `cached` helper and removes caching.{cached,cached_with} instances.
* change from caching backends back to django cache backends

* Move cache_helpers -> cache_nuggets

* Fix CacheStatTracker to not remove OPTIONS values
2018-04-25 16:04:20 +02:00
Mathieu Pillard 1d32388bc7 Allow superusers to see django admin modules nobody else can access 2018-04-03 12:39:20 +02:00
Mathieu Pillard de5dd57d83
Move "staff" admin into regular django admin & add Admin:Curation permission (#7875)
Move "staff" admin into regular django admin & add Admin:Curation permission

In addition, to allow this to happen, refactor the way we deal with django
permissions as needed by the django admin, by adding a mapping to our own
permissions system. At the moment the only mapping really needed is for
Admin:Curation, which allows full access to ReplacementAddon objects in
the admin.

Because the django admin can now properly show you and give you access
to only what you have the permissions for, the "staff" admin is no longer
necessary and removed in this commit.
2018-03-28 15:16:21 +02:00
Andreas Wagner 8dd20c4960
Upate last dev-agreement change date for new review policies (#7903)
Upate last dev-agreement change date for new review policies
2018-03-27 15:15:23 +02:00
Mathieu Pillard 1ca2041cb7 Store averagerating as a float directly, not a string containing a float 2018-03-23 16:53:34 +01:00
Mathieu Pillard 28b3fb83fe Convert UserProfile's addon average rating to float to match other models 2018-03-23 13:47:48 +01:00
Mathieu Pillard 244fb08076
Merge pull request #7836 from rafspiny/bug/7731-wrong-math-photo-size
Compute the right photo limit size. Adding a test for this exploting …
2018-03-19 11:36:50 +01:00
rafspiny 29629cbc8d Making the code style complaint. 2018-03-18 22:41:15 +01:00
rafspiny 5d42686b63 Compute the right photo limit size. Adding a test for this exploting Mock. Fix #7731 2018-03-17 00:38:33 +01:00
Sanyam Khurana 35386e9aed Fixes #7679: Change anonymous user image url/picture_type to a null value (#7715) 2018-03-10 21:20:03 +08:00
rafspiny 21936d5368 Adding a test to make sure we cannot change the display_name to a denied one. Ref #7449 2018-03-06 22:38:59 +01:00
Mathieu Pillard 8d4520063d Use IMG_TYPES constant whenever possible 2018-02-23 17:18:11 +01:00
Mathieu Pillard 1697787b91 Prevent uploads of non images for user photo and collection icon 2018-02-22 18:36:57 +01:00
Andrew Williamson dc9a6678ef
save original uploads of icons and previews too (#7586) 2018-02-17 02:21:09 +08:00
Christopher Grebs 7d8d74ee3b
Make delete user copy more clear about what happens if you log in again.
Fixes #2451
2018-01-30 14:32:19 +01:00
Andrew Williamson 3d8bc5bede
Remove Viewer and Support add-on author roles. (#7384) 2018-01-29 23:02:34 +08:00
Mathieu Pillard d0173591ee Invalidate old sessions when soft-deleting a user account 2018-01-22 16:41:59 +01:00
Vishal Sharma 181b976ab1 Added appropiate spacings in users email templates. (#7237) 2018-01-09 19:09:34 +00:00
Mathieu Pillard 22f5c44f42 Avoid one-letter variable for addon in list comprehension 2018-01-08 15:51:19 +01:00
Mathieu Pillard 1a57ed8b42 Reindex add-ons when authors username/display_name changes 2018-01-08 15:16:03 +01:00
Christopher Grebs 57915e2480
Add isort to our codebase. (#7118)
* Add isort to our codebase.

This is the first draft, please feel free to discuss this but I'm
generally open to change that style later on.

I just want to start making more and more of our code-style a rule
instead of something we have to take care of during code reviews.

* Ignore safe_xml file

* Don't change safe_lxml_etree

* Fix import unifification going bonkers, I don't blame isort though, this was creepy.

* Fix signin.test_views

* More flake8

* Use style number 4, hanging grid

* django group only contains django now, move above 3rd party group

* Remove pytest-isort for now to avoid isort being imported during tests.

isort has a super bad module that sets the defaultsystemencoding to
utf-8 and breaks our tests that ensure that our settings are *never*
unicode strings. If the default system encoding is set to utf-8 these
tests just work since the bytestring will be implicitly encoded to utf-8
instead of ascii which is the python2 default.

https://github.com/timothycrosley/isort/blob/develop/isort/pie_slice.py#L145
2018-01-08 12:05:14 +01:00
Andrew Williamson 7912c7b08c
prevent @shield.mo and @pioneer.mo guids from being submitted. (#7211) 2018-01-04 12:38:30 +00:00
Andrew Williamson 9eefc17e34
rm all the paypal stats code and remaining old skool payments references (#7011) 2017-11-24 12:54:40 +00:00
Andrew Williamson 4338e45f47
add fxa sqs poller (#6812) 2017-11-16 17:06:44 +00:00
Mathieu Pillard 0af406cbdc
Rename `reviews` to `ratings` internally (#6776)
* Move 'reviews' to 'ratings' to avoid confusion with 'reviewers'
* Change ratings URL names
* Rename Review* models/forms/etc to Rating*
* Rename total_reviews/text_reviews_count/ratings
* Rename activity constants
2017-11-13 18:31:18 +01:00
Mathieu Pillard eea824ffed
Rename and re-organize reviewer groups (#6809)
* Rename and re-organize reviewer groups

- Rename Add-on Reviewers as Reviewers: Legacy, and only give them
  Addons:Review permission.
- Create Unlisted Add-on Reviewers as Reviewers: Unlisted.
- Rename Persona Reviewers as Reviewers: Themes.
- Remove the Senior Personas Reviewers group and SeniorPersonasTools:View
  permission (all Personas reviewer tools are available to all personas
  reviewers).
- Remove the Senior Add-on Reviewers group.
- Create a Reviewers: Content group with the permission Addons:ContentReview.
- Create a Reviewers: Add-ons group with the permission Addons:PostReview.
- Create a Reviewers: Moderators group with the permission Ratings:Moderate.
  That permission replaces the old rules for moderating user reviews.
- Remove the obsolete concept of 'Limited Reviewers'
2017-11-03 15:12:52 +01:00
Hemanth Kumar Veeranki d4d479ac4d Use django default filters instead of babel (#6673)
* Use django default filters instead of babel

Signed-off-by: Hemanth Kumar Veeranki <hemanthveeranki@gmail.com>

* Modified tests to match current datetime behaviour

Signed-off-by: Hemanth Kumar Veeranki <hemanthveeranki@gmail.com>
2017-11-03 12:48:55 +01:00
Andrew Williamson 2d19463bb6 fix author is public updating (#6763) 2017-10-24 17:37:18 +01:00
Andrew Williamson 0f8fcc64cb attempt to fix UserProfile.is_public not being set with auto-approval (#6755) 2017-10-24 10:37:24 +01:00
Mathieu Pillard d2411fd0b6 Rename editors to reviewers everywhere except in the URLs
URLs to follow in a later commit, it will need redirects etc.
2017-10-23 15:55:32 +02:00
Andrew Williamson bba78ddf2f rm remaining old paypal contributions refs (except stats) (#6743) 2017-10-20 16:19:08 +01:00
Andrew Williamson 615886fccc More paypal code removal (#6733) 2017-10-19 17:01:25 +01:00
Mathieu Pillard 30f25588eb Remove post-review waffle and associated code
Includes removal of:
- Old-style developer agreement
- Previous incarnation of auto-approve with conditions
2017-10-17 16:19:43 +02:00
Christopher Grebs 176383b168 Upgrade to Celery 4 (#6667)
* Update celery, config and dependencies to 4.x

* Remove usage of TaskSet, replace with group(), update `ampq`
* Enable redis on travis for better celery 4.x testing
* Fix lib/celery_tests
* Correct test testing email sending retrying on errors
* Fix celery subtask mocking errors.

* Fix celery broker url env variable

* Integrate watchdog for celery autoreload

* Ensure dependencies are updated for worker and web container.

* Restart all services after the dependency update

* Remove explicit celery loader environment variable.

* Restart all services in web and worker after running 'update_docker'

* Increase sleep time a bit
2017-10-16 11:16:41 +02:00
Mathieu Pillard 43d88b4f55 Revert "Upgrade to Celery 4 (#6625)"
This reverts commit 541688d5f2.

This caused some breakage on dev. We suspect it's because newrelic
hooks into the celery task launching code but does not support
celery 4.x yet.
2017-10-13 00:04:27 +02:00
Christopher Grebs 541688d5f2 Upgrade to Celery 4 (#6625)
* Update celery config to seamlessly upgrade to 4.x

* Update celery initialization for new configs and 4.x

* Update dependencies to celery 4.x

* Fix flake8

* Fix typo

* Remove usage of TaskSet, replace with group(), update `ampq`

* Enable redis on travis for better celery 4.x testing

* Fix more test setting names

* Fix lib/celery_tests

* Correct test testing email sending retrying on errors

* Fix celery subtask mocking errors.

* Fix new line

* Fix celery broker url env variable

* Integrate watchdog for celery autoreload

* Try something weird... ui-tests

* do we need extra hosts?

* more sleep?

* Try logging, try docker run to avoid port collisions

* More debugging

* Cleanup again

* Fix logs?

* Ensure dependencies are updated for worker and web container.

* Remove not functioning log saving for onw

* Restart all services after the dependency update
2017-10-12 21:05:21 +02:00
Andrew Williamson e542aec81b Expose permissions on the account serializer and reorg the code a little (#6450) 2017-09-19 16:31:52 +01:00
Andrew Williamson 628e0afd96 add has_anonymous_username and has_anonymous_display_name to user account api (#6426) 2017-09-15 16:37:01 +01:00
Mathieu Pillard 86c30efcea Add username to user information in API responses 2017-09-11 13:11:03 +02:00
Andrew Williamson 3fd56bfedb Add is_public property to determine profile visibility. 404 on False. (#6219) 2017-08-24 16:31:40 +08:00
Andrew Williamson 929f8135c0 only return profile url in UserSerializer for yourself and addon devs (#6035) 2017-07-31 17:36:24 +01:00
Andrew Williamson 7a58b3bb2c update dev accouncements label to mention about:addons newsletter (#6052) 2017-07-31 10:42:52 +01:00
Andrew Williamson 78277d6792 remove UserProfile ES indexing because it's unused (#6017) 2017-07-26 14:34:24 +01:00
Andrew Williamson c2ed5d3ef9 Add a description to static category to be returned via the API (#5980) 2017-07-24 17:11:15 +01:00
Andrew Williamson abcfbdfe75 prevent non-moco from submitting Mozilla Signed Extensions; (#5868)
* prevent non-moco from submitting Mozilla Signed Extensions; Don't re-sign Mozilla Signed Extensions.
2017-07-13 19:08:22 +01:00
Mathieu Pillard 218c0c75df Fix some django deprecation warnings (#5811)
* Replace SortedDict with OrderedDict

* Replace get_field_by_name() by get_field()

* Consider warnings as errors to catch DeprecationWarnings

* Upgrade pytest django, since it generates a lot of deprecation warnings

* Ignore DeprecationWarning from django-csp

* Replace old option parsing syntax in management commands

* Replace request.REQUEST with request.POST

* Replace custom sql to create indexes by model options

* Replace get_all_field_names() with get_fields()

* don't keep this

* Try removing the create-db, we're having errors at teardown

* Fix commands args parsing

* Re-consider DeprecationWarnings as errors

* Remove usage of Context()

* Fix DeprecationWarning caused by paypal PaypalError self.message

* Fix linter test using exception.message

* Fix mock to prevent passing a callable to a queryset filter

* Remove reference to non-existent fixture

* django.forms.util module has been renamed. Use django.forms.utils instead

* (WIP) Support zh-hant & zh-hans instead of zh-TW and zh-CN, respectively.

* Don't pass callable to queryset

* ignore jwt deprecation warnings

* Don't use TestCase.urls anymore

* test against exception message directly

* Simplify nested context managers

* Restore this usage of Context(), it's still valid

* Restore setup.cfg

* Revert "(WIP) Support zh-hant & zh-hans instead of zh-TW and zh-CN, respectively."

This reverts commit 7d82b59850.

* fix flake8
2017-07-03 19:45:24 +02:00
Christopher Grebs b90bf13922 Merge pull request #5791 from mozilla/1573-implement-django-jinja
Loads of clean-ups along the way.

Fixes #1573

* Moves all helpers modules to templatetags.jinja_helpers - there are a few things in there that aren't jinja related so there'll be a follow-up to split that later
* Update Jinja2 to 2.9.6
* Add django-jinja 2.3.1
* move some jingo-minify helpers to olympia.lib to avoid any jingo imports
* unified |f and |fe helpers into one |format_html helper that always escapes everything unless the input is already |safe

* Move helpers, add requirements, fix imports.
* Give backend a proper name
* Port f and fe filters from jingo
* Make start porting reviews jinja helpers module, make first test pass
* Get a handful more tests working, get rid of get_env, more and more jingo calls.
* Disable extension matching, render .txt templates too, fixes more stats tests
* Fix csv_header template to produce some reasonable and csv parsable
* Set trim_blocks to be compatible with jingo
* Unify |f and |fe into one |format that simplifies escaping rules. Update tests.

I think having one unified |format filter is beneficial, especially
given that our current escaping rules were kinda complicated and allowed
for seriously dangerous combinations even with autoescape activated.

Now everything passed as an argument to |format is explicitly escaped
unless marked as |safe, there's no way around that anymore.

* Naive first version using |format instead of |f and |fe, might need more review.
* Fix format for unicode strings
* Rename |format to |format_html
* Move nl2br_xhtml to amo.jinja_helpers, use it in all our templates.
* Move datetime filter to our code temporarily, fix mocks, fix recursive error
* Move csrf call to django_jinja csrf_token tag, fix addons templatetags
* Fix |class_selected usage, fix render_with to get registered
* Remove hack from zadmin, fix zadmin templatetags
* Fix user delete photo test, don't rely on proper context updates that happen in order.
* Fix more nl2br tests
* Fix detail page escape, django escapes differently than jinja
* Remove context from edit_review_reply_form
* Fix date created format filter usage
* Remove templates setting user, fix can_review
* Fix collect_add_widget to not inherit the global context
* Remove happy unicode client
* Cleanup can_review, add tests
* Fix tests, django use different html character for double quote escaping
* Switch to firefox latest to check ui-tests
* Cleanup and fix do_truncate
* Remove jingo, copy jingo-minify helpers that depend on jingo to our lib for now
* Rename nl2br_xhtml -> nl2br
* Jinja 2.9 compat for reviews truncate filter
* Don't use TEMPLATE_DEBUG
* Set default value for q, happens on index page.
* Fix jinja2 formatting with newstyle gettext
2017-06-30 17:57:31 -07:00
Mathieu Pillard 56555158b8 Make admin separate, removing our crazy base_site.html hack (#5797)
Make admin separate, removing our crazy base_site.html hack
2017-06-29 15:37:35 -07:00
Mathieu Pillard ac2b7974fa Update developer agreement / submission process for post-review (#5754)
Update developer agreement / submission process for post-review

Every developer need to read the new agreement page again, which
now contains review rules & policies as well.
2017-06-27 11:12:42 -07:00
Andrew Williamson 75c8e3bdc7 Add authors.picture_url to Addon detail serializer (#5755) 2017-06-27 10:55:06 -07:00
Andrew Williamson 34924dcc7b Update text and default for announcement notification; fix user edit form (#5622) 2017-06-12 14:18:21 +01:00
Mathieu Pillard e0897c05ee Replace our implementation of @cached_property by django's (#5574)
* Replace our implementation of @cached_property by django's

* Fix groups_list cached property deletion, add a test

* Remove useless / broken deletions of cached_properties

In those cases, deleting the property is useless either because
it did not previously exist or because we're not doing anything
with the instance afterwards.

* Move invalidate_groups_list to a method on GroupUser
2017-06-06 18:48:00 +02:00
Christopher Grebs 293cba8046 Fix most django related deprecation warnings (#5552)
* Modernize our urlpatterns, reindex command and settings.

Refs #5528

* Fix more urlpatterns

* fix string view references
2017-06-02 20:11:59 +08:00
Mathieu Pillard 2989ff77fc @cached_property should not return querysets; Remove UserProfile.addons_listed entirely
That property was not super useful nor used much anyway. It's important to
not use @cached_property for querysets because it can break lazy evaluation
and cause surprises...

Fix #5480
2017-06-01 22:06:25 +02:00
Andrew Williamson a48c8ff65d drop {% if reviews %} from profile template (#5518) 2017-05-30 13:24:21 +01:00
Andrew Williamson 7d43e947a8 Add user notification API (#5435) 2017-05-22 15:37:16 +01:00
Andrew Williamson e384ce49be anonymize to delete(); (#5447) 2017-05-18 17:36:26 +01:00
Christopher Grebs 8ca65f6390 Refactor our usage of ugettext/ugettext_lazy.
Fixes #1574

* First part of refactoring... incomplete
* Some more ugettext/ugettext lazy work, still wip
* Last pass on ugettext/ugettext_lazy unification
* Fix last occourences in bandwagon.forms
* More flake8 fixes
* Fix failing unittests
* Lots smaller fixes and replacements from review comments
2017-05-16 10:51:31 +07:00
Andrew Williamson 7dedea628b change biography jinja filters to correctly handle html and new lines. (#5373) 2017-05-10 16:45:59 +01:00
Andrew Williamson a36c416fcc Expand accounts api to expose publicly viewable information for other users (#5318) 2017-05-05 17:19:40 +01:00
Andrew Williamson b838f3efb7 Lose l10n on UserProfile.bio and drop .lang, .region (#5279) 2017-05-02 17:21:02 +01:00
Andrew Williamson f582ab5cec replace celery.AttributeDict; remove Marketplace cruft (#5252) 2017-04-26 11:32:20 +01:00
Mathieu Pillard 61e2acacce Merge pull request #5232 from diox/remove-mobile-specific-templates
Remove mobile templates and views now that addons-frontend powers our mobile site
2017-04-26 11:51:10 +02:00
Andrew Williamson 4f9fa72213 replace all app:action string permissions with tuple constants (#5178) 2017-04-25 09:51:07 +01:00
Mathieu Pillard 7e0faa4a23 Remove mobile templates and views now that addons-frontend powers our mobile site
django-mobility dependency is kept temporarily while we assess how best
to replace its middlewares.
2017-04-21 18:20:43 +02:00
Christopher Grebs 78145b4670 Remove more unused code. Most of it are leftovers from other cleanups. 2017-04-07 17:50:42 +07:00
Andrew Williamson bff11dda4e lightweight replacement for django-cronjobs (#5068) 2017-03-30 19:21:46 +02:00
Mathieu Pillard ad93594db8 Remove unused code (and group in the db) for restricting users 2017-03-28 12:34:10 +02:00
Benjamin Forehand Jr c1f2db3c19 Added complete configuration to enable UI testing. 2017-03-24 08:38:50 -07:00
Mathieu Pillard bd10737722 Merge pull request #4960 from diox/no-more-jwt-for-internal-api-tokens
Remove JWT for internal API auth, use token depending on user.pk and user.auth_id
2017-03-22 16:27:22 +00:00
Mathieu Pillard 1bc7570eb8 Rename 'secret' to 'auth_hash' in API token data 2017-03-22 11:04:05 +00:00
Andreas Wagner 97891a2b13 Restrict deletion of non-moderated user-reviews 2017-03-21 18:06:56 +01:00
Mathieu Pillard 9f943d87f2 Remove backfill_auth_id_for_existing_users command
The command takes too much time and is too hard on the database.
Instead, we're going to generate auth_id for users as they log
in.
2017-03-16 18:21:10 +01:00
Mathieu Pillard 4493197bbe Remove JWT for internal API auth, use token depending on user.pk and user.auth_id
This mimics how django creates session tokens, except a different salt is used.
When a user auth_id is changed, its sessions and tokens are no longer considered
valid.

Note: JWT created by external clients using their API keys are still valid, but
that's a different auth mechanism only used by a handful of APIs, like add-on
signing.
2017-03-16 17:32:23 +01:00
Mathieu Pillard cbcb85c126 Assign each user a random identifier to be used in API auth token generation 2017-03-14 12:02:51 +01:00
Andrew Williamson 8a4fc344ef amo.log() -> activity.models.ActivityLog.create() (#4887) 2017-03-10 12:45:28 +01:00
Mathieu Pillard 19177a796e Move commonware utils we use to our own repos
- Middlewares are integrated to existing ones or moved to amo.middlewares
- Logging is moved to core.logger
- All logging calls are modified to use core.logger
- In addition, get/set_user(), get/set_remote_addr() are moved to core
  to circumvent import issues.
2017-03-08 12:01:03 +01:00
Mathieu Pillard 0e280a07d8 Fix tests using categories with add-ons created by addon_factory()
addon_factory() randomly creates categories and assign addons it
creates to them. Tests were failing because they were manually
creating the addoncategory instance, which in some cases already
existed.
2017-02-27 18:52:58 +01:00
Andrew Williamson bcfe5dc7fb restrict submitting guids that end in mozilla.org to mozilla.com users (#4695) 2017-02-16 17:05:26 +01:00
Mark Striemer 2b2fe676d3 Logout API for mobile pages (#4590)
Supports mozilla/addons-frontend#1557.
2017-02-07 11:25:28 -06:00
Mathieu Pillard d5becbe678 Merge pull request #4554 from diox/ignore-deleted-addons-when-deleting-user
Don't consider deleted add-ons when determining whether an user is a developer or not
2017-02-03 12:07:21 +01:00
Mathieu Pillard 972ac6811a Don't consider deleted add-ons when determining whether an user is a developer or not 2017-02-01 12:35:45 +01:00
Christopher Grebs d2fbdc8ebe Extend createsuperuser command to allow SuperCreate assignment.
This re-adds --no-input arguments and handles it properly.

Fixes #2593
2017-01-31 14:49:20 +01:00
pyup.io bot baade2ce2b Update flake8 to 3.2.1 (#4407) 2017-01-25 11:30:06 +00:00
Andreas Wagner 6240aaf007 Rename editor to reviewer 2017-01-24 11:15:39 +01:00
atiqueahmedziad 03dc6c26e4 Remove breadcrumbs code from AMO 2017-01-11 15:57:53 +06:00
Mathieu Pillard 60d6b8cc87 Replace obsolete reviewed/unreviewed/is_reviewed methods by public/is_public 2017-01-05 17:30:15 +01:00
Mathieu Pillard fec2f659d4 Remove filtering from Addon.objects, remove Addon.with_unlisted (#4130)
Filtering should be done either with the status from now (pure
unlisted add-ons will have STATUS_NULL) or by checking if each
add-on has listed versions or not (with .has_listed_versions()),
or by checking if current_version exists, depending on the
use-case.

Fix #4028
2016-12-19 15:14:32 +00:00
Mathieu Pillard a96fb7c67c Restrict current_version to listed versions only
This has the side-effect of breaking download_latest view for
unlisted addons, since it relied on current_version. From this
point forward this view will always return the latest *listed*
version (it's necessary to make a decision about its behaviour
anyway since we're mixing unlisted/listed versions, and this
preserves backwards-compatibility for listed behaviour).

Also add process_addons --task=update_current_version_for_unlisted
command to reset the field on unlisted addons we have right now.
2016-11-15 16:00:59 +01:00
Mark Striemer 2842d6135a Remove remaining password support, drop confirmationcode (#3866)
Fixes #3746
2016-11-08 10:59:56 -06:00
Andy McKay b5992d5c20 rename blacklist to deny list 2016-10-28 18:11:57 -07:00
Mark Striemer 9df7718a03 Remove remaining FxA migration (supports #3049) (#3771) 2016-10-18 12:55:39 -05:00
Mathieu Pillard 08e4c98d9f Merge pull request #3764 from diox/remove-_latest-version-usage
Remove usage of Addon._latest_version to prepare for the removal of the field
2016-10-17 12:00:43 +02:00
Mark Striemer 923a5f7357 Leave confirmationcode field in for now (fixes #3772) (#3773) 2016-10-14 21:01:51 -05:00
Mathieu Pillard 364a5eeca2 Remove usage of Addon._latest_version to prepare for the removal of the field
It's still set as normal, just no longer used by the latest_version
property, which is now a cached_property to alleviate perf issues.
2016-10-14 14:54:57 +02:00
Mark Striemer a207265995 Remove set_password/check_password (supports #3049) (#3662) 2016-10-13 12:37:43 -05:00
Mark Striemer 66641356da Remove user registration and confirmation (supports #3049) (#3629) 2016-10-12 10:52:51 -05:00
Mark Striemer 2a40fd88eb Use a test backend for client login (supports #3049) (#3656) 2016-10-12 10:52:00 -05:00
Mathieu Pillard d7c5cb44f9 Add user id to user object in API responses 2016-10-10 15:46:34 +02:00
Mark Striemer c6029e54d2 Custom createsuperuser command without password (supports #3049) (#3626) 2016-09-30 08:50:56 -05:00
Andrew Williamson 3fdb0cae8a finish cleaning up preliminary review 2016-09-29 19:37:44 +01:00
Mark Striemer 2914d67736 Show email on edit page (fixes #3629) (#3637)
Supports #3049.
2016-09-28 17:53:53 -05:00
Christopher Grebs a1bdd3e92e Merge pull request #3625 from mozilla/bugfix/3624-fix-duplicate-unsubscribe-string
Remove duplicate 'unsubscribe' string. Fixes #3624
2016-09-27 18:47:47 +02:00
Christopher Grebs 0c38c27658 Remove duplicate 'unsubscribe' string. Fixes #3624 2016-09-27 18:30:41 +02:00
Mark Striemer 450e78a756 Remove change email code (supports #3049) (#3612) 2016-09-27 10:42:02 -05:00
Mark Striemer 94c94a5dc3 Remove BlacklistedEmailDomain (supports #3049) (#3589) 2016-09-23 09:56:36 -05:00
Mathieu Pillard b899af326d Merge pull request #3568 from diox/reviews-refactor-notification-and-logging
Refactor the way Review logging/notifications are made
2016-09-23 15:43:22 +02:00
Mark Striemer 37543842bd Remove edit password support (supports #3049) (#3587) 2016-09-22 16:36:56 -05:00
Mark Striemer 9e3e69e6a8 Remove reset password form (supports #3049) (#3577) 2016-09-22 09:55:18 -05:00
Mathieu Pillard 5c9158400f Fix EmailResetCode and UnsubscribeCode with unicode emails 2016-09-22 14:12:01 +02:00
Mark Striemer fe1f4969b4 Remove legacy login page (supports #3049) (#3563) 2016-09-21 10:38:30 -05:00
Mark Striemer 13704d7cb7 Remove BlacklistedPassword (supports #3049) (#3565) 2016-09-20 14:07:30 -05:00
Mathieu Pillard 8ddc1c4449 Fix function declarations with mutable default arguments 2016-09-19 20:13:32 +02:00
Christopher Grebs a2e703d8e1 Merge pull request #3391 from mozilla/bugfix/translations-fields-1.8
Make translation fields compatible with 1.8 migrations.
2016-09-06 12:58:58 +02:00
Christopher Grebs e1c791f543 Add tests for UserForeignKey to support migrations and 'deconstruct'. 2016-09-06 09:22:38 +02:00
Christopher Grebs f06c918460 Fix UserForeignKey field to work with 1.8 migrations 2016-09-01 22:12:16 +02:00
Mark Striemer 3a92a420ef More direct to FxA log in and register links (fixes #3368) (#3378) 2016-09-01 11:10:38 -05:00
Christopher Grebs 7c560174c6 Implement Django 1.8 compatibility.
* Get rid of addons.query - this will need some benchmarking
   but it was super ugly so I removed it
 * Make sure email fields are using 75 char maxlength (original default)
 * Add replacement for shortcuts.render
 * various stuff along the way...
 * Fix zadmin render helper
 * Less django.shortcuts:render, more our own for compat reasons.
 * Fix dynamic endpoints compat
 * Fix render support for blocklist
 * Save translated fields before we actually save the instance.
   This avoids getting caught by django's sanity check that avoids
   an instance being saved with unsaved related fields set.
 * Fix fix_let_scope_bustage management command
 * Fix another horribly wrong select_related statement
 * use django UUIDField where possible
 * Fix password reset email rendering
 * Fix slugify to work with translation objects
 * Fix stats csv test with updated cache-control header
 * Accept both, verbose and hex version of rss keys
 * Add migration to normalize devhub rss keys
 * Support both formats with and without microseconds for handle_date
 * Copy over render_to_string from jingo and fix it.
 * Unify usage of smart/force text/bytes, also to make sure 'Translation' objects are passed through properly.
 * Make translation model json renderable
 * Unify JSONEncoder usage
2016-08-31 08:31:33 +02:00
Mathieu Pillard f86a1c8bc8 Add API to list add-on reviews for an add-on 2016-08-30 13:49:23 +02:00
Mark Striemer 11f496f0ce Login with ~> Log in with (fixes #3193) (#3338) 2016-08-24 19:44:23 -05:00
Mark Striemer c877a8de25 Note that the log in page is for log in and register in heading (#3239)
Fixes mozilla/addons#180.
2016-08-11 11:00:59 -05:00
Mark Striemer 8fcda27c4e Include some copy on the log in page to explain the process (#3236)
Fixes mozilla/addons#180
2016-08-09 12:23:17 -05:00
Mathieu Pillard 085b19f061 Use translations from this repository instead of db for categories 2016-08-02 12:18:42 +02:00
Mark Striemer a9bd1fd9e1 Waffle FxA migration (fixes #3048) (#3103) 2016-07-20 11:44:54 -05:00
ka7 a6b707331f some trivial spelling fixes (#3107)
some trivial spelling fixes
2016-07-16 19:54:30 +02:00
Christopher Grebs 1c4d33d636 Remove unused code (#3077)
* Remove refinements helper is no where used
* Remove unused SeparatedValuesField
* Remove some more unused and untested helper code.
* logging now has a NullHandler.
* Remove unused lib.licenses
* Use bleach.clean instead of our copy of django's remove_tags
2016-07-15 11:33:27 +02:00
Mark Striemer 8b652ad8af Remove fxa-auth waffle (fixes #3081) (#3062) 2016-07-13 10:46:14 -05:00
Mathieu Pillard 47a3f147b8 Fix error with non-ascii names correctly in disco pane API 2016-06-30 14:23:12 +02:00
Andy McKay 453949c786 delete the right profile picture 2016-06-24 15:44:08 -07:00
Mathieu Pillard 06b58d3375 Merge pull request #2964 from diox/pull-happyforms-in
Pull happyforms in our repos as it's not on pypi
2016-06-23 12:05:13 +01:00
Mathieu Pillard 2458c28e71 Pull happyforms in our repos as it's not on pypi 2016-06-22 18:14:05 +02:00
Andrew Williamson 872c98cf6e Merge pull request #2960 from lavish205/issue_1771
Remove the t-shirt form
2016-06-22 16:59:59 +01:00
Lavish 6a49621e60 Fixed Issue: #1771 Remove the t-shirt form 2016-06-22 21:05:14 +05:30
Mathieu Pillard ab1ebdd78e Merge pull request #2954 from diox/remove-flush-urls
Remove flush_urls methods, no longer used since we got rid of Hera
2016-06-22 11:09:11 +01:00
Christopher Grebs 3998d4349a Merge pull request #2900 from mozilla/feature/upgrade-lxml
Upgrade pyquery, lxml. Add cssselect dependency for lxml.
2016-06-22 11:10:29 +02:00
Christopher Grebs 6f656b5db0 Remove unused log statement from debugging sessions. 2016-06-22 10:54:44 +02:00
Christopher Grebs 5645ad399b Upgrade pyquery, lxml. Add cssselect dependency for lxml. 2016-06-22 09:04:30 +02:00
Mathieu Pillard a4c0d6ec25 Remove flush_urls methods, no longer used since we got rid of Hera
(See also 62d367a7cd)
2016-06-21 18:03:39 +01:00
Christopher Grebs 91bb4a6f8d Merge branch 'master' of github.com:mozilla/addons-server into remove-cef-hera 2016-06-21 09:26:35 +02:00
Christopher Grebs d630276974 Remove cef and heka, change some cef related code to plain logging. 2016-06-17 18:27:55 +02:00
Christopher Grebs 552f436b25 Merge pull request #2928 from mozilla/feature/remove-all-the-things
Get rid of pymysql, fudge, importlib-no-failures and chardet.
2016-06-17 17:22:26 +02:00
Mathieu Pillard 62d367a7cd Remove Hera since we no longer use Zeus. 2016-06-17 15:27:29 +01:00
Christopher Grebs 63fb26c49c Get rid of pymysql, fudge, importlib-no-failures and chardet.
* Updated all code that used chardet to not use it anymore
* Port fudge to mock or even remove it
* pymysql is unused
* importlib-no-failures was only a requirement for python 2.6
2016-06-17 13:28:42 +02:00
Mathieu Pillard 0dde2686fb Upgrade to latest version of flake8 2016-06-14 14:26:39 +01:00
Andy McKay 5912aa48b4 remove some _blanks 2016-05-31 19:37:13 -07:00
Mathieu Pillard b4c1fbdd76 Enable ETag/HTTP 304 responses support for all pages (fix #2732) 2016-05-24 16:05:24 +02:00
Andrew Williamson 8d451edb1c Just fixes the history link in django admin model forms 2016-05-10 13:07:43 +01:00
Andrew Williamson 4e84de2f11 Finally removing nose from our tests. 2016-05-06 17:27:20 +01:00
Mark Striemer d5c0fdc7f5 Fix 500 on account settings (fixes #2484) (#2489) 2016-04-25 13:23:21 -05:00