Commit Graph

391 Commits

Author SHA1 Message Date
uzairr
0f3b3d2763 refactor: hibp call to celery task
Uses is_staff flag to figure out whether the user is internal or not.

Fixes: VAN-664
2021-11-05 18:19:49 +05:00
Waheed Ahmed
100752419e chore: update register identify call traits (#29264)
Updated identify call traits and only include the email_subscribe attribute
if the feature is enabled.
2021-11-05 15:43:15 +05:00
Adeel Ehsan
2aa220094c feat: Remove el option from education levels (#29150)
If COPPA flag is set to true then remove el options from education levels

VAN-760
2021-10-28 15:50:47 +05:00
Waheed Ahmed
d5ab616ca8 feat: COPPA - remove primary/elementary option from education (#29147)
Remove `primary/elementary` option from education field if COPPA compliance
feature flag is enabled. Also, renamed the flag.

VAN-762
2021-10-28 14:12:53 +05:00
Mubbshar Anwar
905c0a1eb9 fix: cta pop up (#29125)
do not show cta pop up when opt in checkbox show on register page.

VAN-740
2021-10-27 20:34:45 +05:00
Adeel Ehsan
873ca35dd9 Merge pull request #28844 from edx/aehsan/VAN-702/username_suggestions_format_updated
Username suggestion added based on the full name
2021-10-26 12:20:24 +05:00
M. Zulqarnain
43008723be feat: New codemods on OpenedX 3 (#28778) 2021-10-22 13:55:51 +05:00
M. Zulqarnain
9833134fae Post Django 3.2 Cleanup (#29069)
* chore: Post Django 3.2 Cleanup
2021-10-22 13:55:16 +05:00
Zainab Amir
6019971dd4 feat: put year of birth behind feature flag (#29007) 2021-10-22 12:17:06 +05:00
adeelehsan
590ba28913 Username suggestion added based on the full name
VAN-702
2021-10-22 11:56:39 +05:00
Usama Sadiq
9ee8df0980 fix: Remove pylint constraint and fix warnings (#28646) 2021-10-20 23:00:13 +05:00
Robert Raposa
b92bc527a8 fix: mark register user change
Since we may get user changes during registration,
we mark it as expected so our Safe Session protection
won't be triggered.
2021-10-18 12:05:28 -04:00
Feanil Patel
bc00e64409 fix: Decorate celery task to set code owner attribute.
See https://edx.readthedocs.io/projects/edx-django-utils/en/latest/monitoring/how_tos/add_code_owner_custom_attribute_to_an_ida.html\#handling-celery-tasks fo more details.
2021-10-15 13:55:12 -04:00
Felipe Montoya
678c159cf8 docs: adding the first version of documentation for open edx events
Includes:
- general documentation
- links to individual events definitions and location
- adding examples to events docs
- adding annotations at the trigger location
2021-10-13 15:28:24 -05:00
Tim McCormack
fe3d855986 feat: Don't warn about expected user changes in safe-sessions (#28983)
This is intended to silence a rare false positive that seems to happen
when someone logs in on a browser that already has an active session
for another user. We believe there should be no further positives once
this case is handled.

- login and logout views annotate the response to indicate the session
  user should be changing between the request and response phases
- safe-sessions middleware skips the verify-user check when this
  annotation is present

Also:

- Adds a test around existing behavior for unexpected user-changes
- Remove logging control based on `is_from_log_out`. This reverts most
  of af9e26f/PR #11479 for two reasons:
  - The safe-sessions `_verify_user` code has since changed to check for
    `request.user.id == None`
  - A commit later in the PR changes the login and logout pages to
    signal that the user/session change is expected
2021-10-13 15:53:16 +00:00
Shafqat Farhan
feb732d859 fix: VAN-739 - removed is_active property from Segment 2021-10-11 19:23:14 +05:00
Manjinder Singh
9ef8332a60 Revert "feat: adding code owner for a Celery event"
This reverts commit 2c37fec345.
2021-10-08 17:30:16 -04:00
Manjinder Singh
2c37fec345 feat: adding code owner for a Celery event 2021-10-08 17:29:06 -04:00
Mubbshar Anwar
23c94b7ec5 fix: add opt in/out event (#28985)
add opt in/out event for Braze.

VAN-738
2021-10-08 22:39:54 +05:00
Mubbshar Anwar
66291c3aa6 feat: record opt in/out attribute (#28883)
* feat: record opt in/out attribute

save opt in/out attribute comming from frontend-app-authn register page.
VAN-738

* feat: VAN-738 - Send marketing event property and email subscription

* feat: VAN-738 - Send marketing event property and email subscription

* feat: VAN-738 - updated conditions

* feat: VAN-738 - added is_active for braze during registration

* feat: VAN-738 - added is_active for braze during registration

* feat: VAN-738 - fixed pep8 violation

Co-authored-by: Shafqat Farhan <shafqat.farhan@arbisoft.com>
2021-10-08 18:29:18 +05:00
Robert Raposa
e41520dbae feat: return user id from login_refresh (#28905)
To enhance monitoring of login_refresh issues that happen
in the frontend, return user id as part of successful
refreshes.
2021-10-04 11:00:07 -04:00
uzairr
c83750ff58 add hipb api client 2021-09-24 13:09:14 +05:00
Ivo Branco
6f0255bc60 Fix use a registration field order when using a registration extension form (#26633) 2021-09-23 11:07:49 +05:00
Jawayria
43d0b4eec8 Merge pull request #28709 from edx/jawayria/fix-check
fix: Added the condition on body_type in test_reset_password
2021-09-13 16:15:08 +05:00
Tim McCormack
0c164ad4c2 fix: Fix Studio logout by pointing to correct logout view (#28714)
This changes the "Sign out" link on Studio to point to Studio's own logout
view, which clears the session and then redirects to LMS's logout page. The
LMS logout page then skips loading the Studio logout because it is seen in
the Referer header.

This change also brings Studio better into line with how other IDAs perform
their logouts.

Background:

After the rollout of Studio OAuth, logouts initiated on Studio failed to
actually log out Studio (but all other IDAs were logged out). This was
because the LMS logout view loads the logout pages of other IDAs but skips
any that is a *prefix* match on the Referer header, and browsers now often
send a truncated version of the Referer for privacy. Therefore, Studio was
always skipped when coming from Studio.

The fix is to make sure that Studio has already performed its logout by the
time the LMS logout page is loaded.

One wrinkle here is that the LMS logout view is activated by `/logout`, but
the correct logout view (provided by auth_backends) is activated by
`/logout/` -- with a trailing slash. This is fragile and unfortunate, but
can be cleaned up when we later remove other leftovers of Studio's previous
ability to handle logistration.

ref: ARCHBOM-1897
2021-09-10 18:45:58 +00:00
Jawayria
a3fd502bab fix quality 2021-09-10 21:10:21 +05:00
Jawayria
dee102a70b fix: Added the condition on body_type in test_reset_password 2021-09-10 18:14:07 +05:00
Zainab Amir
40dba56cff fix: auto register send_activation_email task (#28694) 2021-09-09 14:13:35 +05:00
Zainab Amir
517c4af90c fix: rename send_activation_email task (#28678) 2021-09-08 17:52:03 +05:00
Zainab Amir
bf76fb3f7f move send_activation_email celery task (#28666)
- moved send_activation_email to user_authn app
- registered task under both new and old name
- exposed the old name for task invocation

VAN-417
2021-09-08 10:44:54 +05:00
Jawayria
b3cb59b07f fix: Replaced '&#39' with '&#x27' to prevent test_reset_password_email from failing on Django 3 2021-09-07 17:31:14 +05:00
mariagrimaldi
c0618592d2 feat: add 1st batch of Open edX events
* Add STUDENT_REGISTRATION_COMPLETED event after the user's registration
* Add SESSION_LOGIN_COMPLETED event after the user's login session
* Add COURSE_ENROLLMENT_CREATED event after the user's enrollment creation
2021-09-02 10:05:23 -04:00
uzairr
d0c953f261 update session on password change 2021-09-01 02:41:40 +05:00
Jhony Avella
95a6abcd1f revert: removing read_committed argument from outer_atomic function (#28161)
In the PR https://github.com/edx/edx-platform/pull/10659 the outer_atomic decorator/context manager was created to prevent nested atomic blocks. This method received a boolean parameter read_committed to enforce read-committed MySQL isolation level. From Django 2, the default isolation level Django sets is read-committed, so the aforementioned parameter for outer_atomic can be removed
2021-08-31 16:39:35 -04:00
Maria Grimaldi
54627e1101 refactor: replace User for UserFactory and its methods
This change is done so the profile is automatically created for tests users
2021-08-30 11:03:49 -04:00
Usama Sadiq
cde050618e build: Moved user and group management commands and unit tests to edx-django-utils
- Removed manage_user and manage_group commands and their unit tests from edx-platform and added then to edx-django-utils.
- Modified User.post_save signal to ensure the user profile is created when manage_user management command is run to create a user.
- Added edx-django-utils to INSTALLED_APPS for LMS and Studio.
- Moved generate_password from openedx.core.djangoapps.user_authn.utils to edx_django_utils.user along with its unit test.
2021-08-30 12:03:37 +05:00
Maria Grimaldi
2ee52ea96c refactor: replace some create_user with UserFactory to avoid non-existent profile errors 2021-08-24 15:49:21 -04:00
Zainab Amir
3f0aa42d84 feat: add activation link to registration event (#28513)
Added activation key to the registration event to be used by braze.
Specifically it will be used by activation reminder emails.

VAN-693
2021-08-24 16:12:45 +05:00
Attiya Ishaque
7d029f8283 [VAN-332] Full name validation on registration page. (#28444) 2021-08-12 16:07:32 +05:00
Waheed Ahmed
e203309019 feat: increment lockout counter upon NonCompliantPasswordException (#28218)
Increment lockout counter upon `NonCompliantPasswordException` to prevent further
login attempts after 6 attempts and also to prevent further reset password emails.

Reports from some users receiving 100s of password emails, upon investigation seems
like their password is not compliant with edX and has been compromised.

VAN-192
2021-07-19 18:34:36 +05:00
Waheed Ahmed
74e3b664eb fix: clean accent characters from username (#28157)
Also cleaned username for Authn MFE while registering using SSO/SAML.

VAN-483
2021-07-13 20:33:22 +05:00
Diana Huang
9173707a50 feat: Allow shared cookies' domains to be set separately. (#28135)
Several of our cookies are meant to be shared between the LMS
and the marketing site. The previous assumption was that
SESSION_COOKIE_DOMAIN would cover both. We would like to make
it so that these can be set independently of each other.

https://openedx.atlassian.net/browse/ARCHBOM-1831
2021-07-12 15:49:11 -04:00
Zaman Afzal
843e9ba29b ENT4083: Removed ENABLE_MULTIPLE_USER_ENTERPRISES_FEATURE waffle switch (#28057) 2021-06-30 13:58:11 +05:00
mubbsharanwar
7b299977b7 fix:Login failed email_or_username
Fix email_or_username null in login failed case.

Fixes: VAN-532
2021-06-14 10:38:40 +05:00
Adeel Ehsan
335a0f28de Merge pull request #27661 from edx/aehsan/VAN-434/account_activation_dialogue_box_added
Account activation popup added
2021-06-10 15:20:15 +05:00
adeelehsan
78f1f1916c Account activation popup added
VAN-434
2021-06-10 14:46:49 +05:00
Simon Chen
a284b9704c [Fix]: CR-3731 correct the spelling of the error message on password reset (#27883) 2021-06-08 11:33:37 -04:00
uzairr
dd5c3790c3 refactor login api 2021-05-21 19:59:41 +05:00
Waheed Ahmed
ea29318f22 fix: username suggestion generation (#27641)
If all generated usernames using an integer range are already consumed by existing
users, the loop stuck in an infinite loop. Fixed by using a for loop instead of
while with an upper limit.
2021-05-19 14:53:06 +05:00
Usama Sadiq
4f4be6538a BOM-2477: pylint warnings lint-amnesty (#27585) 2021-05-11 17:22:40 +05:00