Commit Graph

722 Commits

Author SHA1 Message Date
Christie Rice
81bcfdf1ec MICROBA-393 Add customized partner report headings (#24502) 2020-07-16 08:58:08 -04:00
Christie Rice
a22957d504 Revert "MICROBA-393 Add customized partner report headings (#24437)" (#24480)
This reverts commit ef536e49de.
2020-07-14 11:30:11 -04:00
Christie Rice
ef536e49de MICROBA-393 Add customized partner report headings (#24437) 2020-07-14 10:37:36 -04:00
Florian Haas
26281cbe36 Fix profile image URLs for image storage on non-public S3 buckets
In image_helpers.py, the _get_profile_image_urls() method would append
"?v=<version>" to the query string for serving profile images.

This might break serving profile images if

* EDXAPP_PROFILE_IMAGE_BACKEND was configured with its class option
  set to django.storages.s3boto3.S3Boto3Storage (or its deprecated
  predecedessor, django.storages.s3boto.S3BotoStorage), and
* that backend used signed URLs with query-string authentication (i.e.
  was *not* configured with an S3 custom domain).

When both the above conditions are met, then the URL returned by the
storage backend's url() method already contains "?", and
_get_profile_image_urls() would add another. This results in a query
string that doesn't exactly violate RFC 3986, but is discouraged by
it.[1]

Amazon S3 itself may be able to parse these query strings correctly,
but other S3 API implementations (such as Ceph radosgw[2]) may not,
and the problem is easily avoided by just looking for "?" in the
rendered URL, and using "&v=<version>" instead if we find a match.

The proper way of appending the v=<version> query parameter would
probably be to pull the URL and the query string apart and then back
together[3], but that's most likely overdoing it.

[1] https://tools.ietf.org/html/rfc3986#section-3.4 says:
"However, as query components are often used to carry identifying
information in the form of "key=value" pairs and one frequently used
value is a reference to another URI, it is sometimes better for
usability to avoid percent- encoding those characters." ("Those
characters" being "/" and "?".)

[2] https://docs.ceph.com/docs/master/radosgw/s3/

[3] https://docs.python.org/3/library/urllib.parse.html
2020-07-06 11:09:16 +02:00
stvn
0ae91c0921 Replace references to 'log.warn' with 'log.warning'
to remove some `DeprecationWarning`s from the logs
as the former method as been deprecated since Python 3.3 [1][2].

- [1] https://github.com/python/cpython/blob/3.3/Lib/logging/__init__.py#L1252-L1253
- [2] https://stackoverflow.com/a/15655674
2020-06-18 12:08:15 -07:00
Stu Young
b370745b9b management command to retire a single user (#24188) 2020-06-10 18:07:25 -04:00
adeelehsan
d879f9fd00 Merge pull request #23980 from edx/aehsan/PROD-1582/specify_user_message_for_about_me_in_profile
Specify bio field error message for user
2020-06-10 14:46:04 +05:00
adeelehsan
4e1fe2045f Specify bio message for user
Currently user message is generic. Specifying for
bio field so that it make more sense to user.

PROD-1582
2020-06-10 14:19:39 +05:00
Christie Rice
8663b5becc MICROBA-403 Add phone number (#24087) 2020-05-28 16:19:29 -04:00
Ned Batchelder
68aceff860 Merge pull request #23968 from edx/nedbat/docs-progress
Update swagger.yaml, fix some markup errors
2020-05-16 14:50:35 -04:00
Olivia Ruiz-Knott
f72a6556a9 MICROBA-311 Add US State field to UserProfile
Add list of states and field to UserProfile model; add migration; add
state field to relevant serializers and to
ACCOUNT_VISIBILITY_CONFIGURATION. Removes state data if country is
changed to something other than United States.
2020-05-12 13:55:11 -04:00
Ned Batchelder
cca33732ba Correct markup mistakes in api docs 2020-05-12 13:36:14 -04:00
Matt Tuchfarber
4910cfa180 Strip non-numeric characters from phone number
Allows user to type in phone number in whichever
format they prefer.
2020-05-07 10:10:42 -04:00
Adeel Khan
9778e69c76 Removes enterprise filter for account recovery banner
Previously code was only showing banner for enterprise
learners. This patch would remove this restriction
and is available to all edX learners provided that
'enable_secondary_email_feature' is switched on.

PROD-1477
2020-04-29 17:44:25 +05:00
Luis Moreno
3d8875d505 Fix docstring of retrieve_last_sitewide_block_completed 2020-04-22 12:45:22 -04:00
zia.fazal@arbisoft.com
f70390d70f Added more info to log in SSO request/response flow
Added more info to log in SSO request/response flow
Fixed django admin links on model's link fields which are broken due to django 2.2 upgrade.
ENT-2798

Fixed quality violations and unit test

Fix xsscommitlint violation

Fixed pylint violation
2020-04-20 14:38:51 +05:00
asadazam93
ee0bcd36ec Deactivate account 403 error log 2020-04-14 17:44:12 +05:00
M Zulqarnain
39dcc8b180 BOM-1514 : Remove waffle switch PREVENT_AUTH_USER_WRITES (#23686)
* Remove waffle switch PREVENT_AUTH_USER_WRITES
2020-04-10 18:21:12 +05:00
Zaman Afzal
c7e2f8d49a ENT-2651 Recovery email Field UX logic on Account Settings page was not same to dashboard (#23565) 2020-04-08 16:21:37 +05:00
asadazam93
2ad8281343 Added temporary logs 2020-04-06 17:12:31 +05:00
Albert (AJ) St. Aubin
9fb65532d6 Added an email search parameter to accounts 2020-03-27 11:24:25 -04:00
Awais Qureshi
0f002bafb8 BOM-1399
checking django-wiki and fixing deprecation warnings.
2020-03-16 14:37:18 +05:00
Awais Jibran
6a25ca800b ~200k instances in last 7 days. 2020-03-12 14:22:52 +05:00
Troy Sankey
d428f7530d Revert "Revert "Rename values in SiteConfiguration (2/3) attempt #2""
This reverts commit e6f58b6d4c.

This is our third (3rd!) attempt to deploy stage 2 of this column rename.
2020-03-04 14:53:47 -05:00
Feanil Patel
5ec487452d Merge pull request #23188 from edx/robrap/BOM-1324-add-constraint
BOM-1324: remove oauth2.enforce_jwt_scopes toggle
2020-03-02 09:55:35 -05:00
Manjinder Singh
d08cd9ce04 Removing provider imports from edx-platform (#23229)
* Removing from provider imports from openedx

 * removed all uses of retire_dop_oauth2_models

* Removing provider library from lms, common, and cms

Created/copied function short_token(from django-oauth-provider) and create_hash256 to help with conversion
2020-03-02 08:56:54 -05:00
Troy Sankey
e6f58b6d4c Revert "Rename values in SiteConfiguration (2/3) attempt #2" 2020-02-27 13:24:55 -05:00
Troy Sankey
3fdd08b683 Merge pull request #23214 from edx/pwnage101/rename_site_configuration_siteconfiguration_values_2.1
Rename values in SiteConfiguration (2/3) attempt #2
2020-02-27 10:34:37 -05:00
Robert Raposa
e2cc7fa348 fix failing tests 2020-02-27 09:00:01 -05:00
Matt Tuchfarber
82024fbf77 Add phone number to account API
This is so it's user editable in the Account MFE.
2020-02-26 15:06:38 -05:00
Troy Sankey
c422dec083 Revert "Revert "Rename values in SiteConfiguration (2/3)""
This reverts commit b85aa4b3fb.
2020-02-26 12:54:24 -05:00
Troy Sankey
b85aa4b3fb Revert "Rename values in SiteConfiguration (2/3)" 2020-02-26 11:23:56 -05:00
Troy Sankey
1307946d05 Merge pull request #22851 from edx/juliasq/rename_site_configuration_siteconfiguration_values_2
Rename values in SiteConfiguration (2/3)
2020-02-26 10:26:22 -05:00
Julia Eskew
3541643dd5 Rename values in SiteConfiguration (2/3)
This stage does the following:

- Includes a data migration to copy the values from old to new field.
- Changes business logic to switch to using new field.
- Deletes all code references of the old field.
2020-02-25 13:54:02 -05:00
Mike O'Connell
c242ed6aca Add existence check on secondary email
Moves the existence check for secondary (recovery) email to validate
method. If the email already exists, silently remove it from the set of
data to be updated. This parallels the existing behavior for updating
the primary email.

ENT-1913
2020-02-24 13:03:09 -05:00
Troy Sankey
3f85ba3fe6 Merge pull request #23144 from edx/pwnage101/rename_site_configuration_siteconfiguration_values_1.1
Rename values in SiteConfiguration/History (1/3) (retry)
2020-02-21 11:42:15 -05:00
Dave St.Germain
00f5beb66f Merge pull request #22992 from edx/dcs/perf-vertical
Improve Vertical Performance
2020-02-20 12:30:22 -05:00
Dave St.Germain
a5b0f71108 Several optimizations for improving vertical rendering performance. 2020-02-20 11:41:21 -05:00
Mike OConnell
5ec786831b Merge pull request #23114 from edx/ENT-2607-2
Don't update account recovery until after activation
2020-02-20 09:03:59 -05:00
Mike O'Connell
bc99a31738 Merge branch 'master' into ENT-2607-2 2020-02-19 14:01:28 -05:00
Mike O'Connell
2c5264cb94 Unit test for account recovery
Add a unit test to create and activate a recovery email address

ENT-2607
2020-02-19 14:00:07 -05:00
Diana Huang
2f019c4d23 Rename profile image hash seed to better describe what it is. 2020-02-19 13:11:45 -05:00
Troy Sankey
18deacde54 Revert "Revert "This stage does the following: (#22692)""
This reverts commit 84de6bc6de
which reverts commit cebeab4348
which implements the first stage of the `values` column rename in
SiteConfiguration.  However, I included a small change:

This time, we set a default value on the new `site_values` column so
that the ORM will happily deserialize the JSONField without throwing a
JSONDecodeError.
2020-02-19 12:01:57 -05:00
Manjinder Singh
d7bd80a100 Renamed OAuth2Authentication to BearerAuthentication (#23128)
* Renamed OAuth2Authentication to BearerAuthentication
* Added back OAuth2Authentication name
-there are libraries such as edx-enterprise that still import OAuth2Authentication.  The OAuth2Authentication class should be fully removed when everything is importing BearerAuthentication correctly
2020-02-18 13:29:29 -05:00
Mike O'Connell
e5e96c9dde Don't update account recovery until after activation
Rather than to create or update the account recovery record when the
Account Settings page is updated, defer updating until the new
recovery email is confirmed

ENT-2607
2020-02-14 09:59:36 -05:00
Nathan Sprenkle
c66176da13 Add error reporting to UI for CSV team management (#23035)
* Add error banner for upload memberships errors

* Edit error message language

* Fix linter warnings
2020-02-14 09:58:58 -05:00
Manjinder Singh
cce8cdd661 Replacing OAuth2Auth (#23067)
- Removing deprecated auth classes
- Replacing OAuth2AuthenticationAllowInactiveUserDeprecated with OAuth2AuthenticationAllowInactiveUser
- the old class was a child class of a deprecated class that we are removing and replacing.
2020-02-11 10:38:13 -05:00
Muhammad Soban Javed
6dfcddd6d8 Merge pull request #23030 from edx/BOM-1251
Fixing deprecated django-filter features
2020-02-07 18:45:30 +05:00
Manjinder Singh
cea795b02e Added new auth class (#23018)
* Added new auth class

- Created new class called OAuth2AuthenticationAllowInactiveUser, which replaces old class with same name
- Renames previous  OAuth2AuthenticationAllowInactiveUser to  OAuth2AuthenticationAllowInactiveUserDeprecated
- Replaced all imports of  OAuth2AuthenticationAllowInactiveUser to call deprecated class instead
- testing new class in discussion(added flag based on django setting)
2020-02-06 10:37:27 -05:00
iamsobanjaved
82dd040382 fixed deprecated django-filter features 2020-02-06 18:32:36 +05:00