Commit Graph

94 Commits

Author SHA1 Message Date
Alexander Dusenbery
2fcce121e9 feat: make marketing email and research opt-in checkboxs selectively ignorable
We want to support a flow for SSO-enabled Enterprise customers who have
agreed off-platform that none of their learners will opt-in to marketing emails
or sharing research data. This change proposes to do so by
adding an optional field that, when enabled, disables the presence of
the two checkboxes on this registration form and sets their values to false.

ENT-11401
2026-03-02 12:47:21 -05:00
Sameen Fatima
8ca34141a6 feat: look up remote_id by remote_id_field_name (#37228) 2025-11-13 09:20:26 +05:00
Ahtisham Shahid
dc7db1d3ad feat: unpinned social-auth-core (#37550)
* feat: unpinned social-auth-core

feat: unpinned social-auth-core

* fix: updated to resolve failing tests

* fix: resolved linter errors and failing tests

* fix: updated get_attr signature according to new version
2025-10-29 13:16:34 -04:00
Kyle McCormick
ccf2b75204 fix: stabilize makemigrations when SITE_ID != 1 (#34787)
Some models in third_party_auth used settings.SITE_ID as a field
default, which caused Django to say migrations were out of sync whenever
settings.SITE_ID happened to be anything other than 1 for any developer:

    Your models in app(s): 'third_party_auth' have changes that are not
    yet reflected in a migration, and so won't be applied. Run
    'manage.py makemigrations' to make new migrations, and then re-run
    'manage.py migrate' to apply them.

This could easily happen if a developer is testing out site
configuration or site-specific theming and ends up with a SITE_ID other
than 1.

The fix, inspired by a StackOverflow answer [1], is to simply create
a wrapper function for the dynamic default value. The wrapper function,
rather than the current value of SITE_ID, will be serialized to the
migraiton file.

This commit includes a migration file, but from a database perspective,
the migration is a no-op.

[1] https://stackoverflow.com/a/12654998
2024-05-22 13:52:53 -04:00
Navin Karkera
565b34e4e0 feat: allow oauth configuration per site and backend (#32656)
Allows admins to configure same oauth backend for multiple sites.

This change includes site_id in KEY_FIELDS for oauth configuration
provider allowing a backend configuration for each site.
2023-10-10 11:33:23 -04:00
Moeez Zahid
5b1eb3777e feat: Support Apple team Migration (#31861)
* feat: LEARNER-8790 Support Apple team migration
2023-03-10 13:06:31 +05:00
Eugene Dyudyunov
3d86f8d8de fix: registration form population with unicode through tpa (#30935)
Fixes the registration form username field prefilling with the
third party auth data when unicode usernames are allowed.
2022-09-07 11:59:58 -04:00
Alexander Sheehan
9b1e8dc515 chore: rolling back unique entity ID validation on saml provider configs 2022-07-21 13:55:27 -04:00
Alexander Sheehan
605a328f24 fix: accounting for only current configs when checking for uniqueness 2022-06-27 16:56:37 -04:00
Alexander Sheehan
fd6b726a68 fix: accounting for non-unique entity ID on idp configs + fixing provider data bulk update bug 2022-06-22 11:02:08 -04:00
Alexander Sheehan
8d6e041d7e fix: allowing for multiple idp data configs 2022-06-06 09:58:33 -04:00
Alexander Sheehan
f4c3471a9b fix: adding was_valid_at to all provider configs 2022-03-24 12:02:14 -04:00
Alexander Sheehan
d852e38cba feat: new is_valid field for provider configs 2022-03-21 10:56:15 -04:00
Kira
0ba94409bd fix: lengthening display name 2022-03-15 10:14:54 -04:00
Kira
97f05b4e4a fix: lint errors 2022-03-14 13:30:52 -04:00
Kira
5dc39666e4 feat: add display name and make saml config draft 2022-03-14 12:34:19 -04:00
M. Zulqarnain
ba75bb6569 feat: django codemods changes for common folder (#28775) 2021-10-21 13:52:19 +05:00
Talia
45772158bc feat: add boolean field to third_party_auth to be used to remove providers from enterprise selection 2021-07-23 14:17:33 -04: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
Awais Qureshi
8f4491e927 Pyupgrade in common/djangoapps/third-party-modes/ 2021-03-18 11:26:19 +05:00
mariagrimaldi
acc9eaed8c feat: Changed username max_length to get it from setting and set default to 30 chars 2021-02-19 15:29:14 -04:00
Jawayria
7be5a683aa Applied pylint-amnesty to third_party_auth 2021-02-03 13:37:05 +05:00
Gábor Boros
6ccd6c308d docs(lms and studio): Replace all .(lms|cms).(\w+|_)?\.json to .(lms|cms).(\w+|_)?\.yml 2020-09-18 10:44:14 +02:00
taliaedX
728d57aac2 Merge pull request #24888 from edx/trhodes/ENT-3350
SAML Configuration API endpoint (And Public Flag)
2020-09-08 10:42:45 -04:00
Talia
9cbd1907ea SAML Configuration API endpoint + Public flag 2020-09-04 14:58:05 -04:00
Régis Behmo
288ccc6705 Fix creation of LTIProviderConfig object in admin
When attempting to create a "Provider Configuration (LTI)" object in the
django admin, the following 500 error was being triggered:

    "Either an icon class or an icon image must be given (but not both)"

This was caused by the `clean()` method of the mother class
(OAuth2ProviderConfig) which checked whether at least the icon_class XOR
icon_list attribute was well defined. In the case of the
LTIProviderConfig objects it isn't, but that's ok because this object
is not meant to be displayed in the login form.

To resolve this issue, we modify the `clean()` method to ensure that at
most icon_class or icon_image is set. Alternatively, we could have set
`visible = False` and then dropped the `visible` column from the
database, but it was deemed too risky.
unused.

Close CRI-205.
2020-08-21 09:51:12 +02:00
Talia
6d365ca1da fixes for front end saml work and to align with data requirements. 2020-07-24 14:45:34 -04:00
Alexander Sheehan
0e5b70a800 Adding country to list of attrs, updating help text and max length 2020-07-23 16:29:05 -04:00
Alexander Sheehan
2e2493f99d ENH adding country to SAML mapping config 2020-07-21 16:23:00 -04:00
Tim McCormack
9cff06d762 Address 1+N django_site queries on login page by comparing keys directly (#23947)
Rather than fetching the Site for every provider in a loop, just look at
the ID of the site.

Added regression test, showing N `django_site` requests before and 0 after.
2020-05-11 15:37:22 +00:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +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
Manjinder Singh
953b0e728b Remove ThirdPartyAuthProviderApiPermission (#23195)
* Remove ThirdPartyAuthProviderApiPermission

Also removed ProviderApiPermissions and ApiPermissionsAdminForm and removal of DOP for third_party_auth

* Removing model

* Replaced long_token with default_token_generator

* Adding skip to test_migrations_are_in_sync
2020-02-27 15:42:09 -05:00
zia.fazal@arbisoft.com
d7ed021b8d Added ability to logout from IDP
Logout link should be displayed only for learner portal

Added changed to display only for learner portal
Added unit tests

check third_party_auth is enabled

Changes to extend SSO logout link feature to Oauth providers

Fixed quality violations

Removed unncessary assert

Reviewer feedback changes
2020-02-07 19:38:36 +05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Nimisha Asthagiri
f533134db1 Merge pull request #22086 from edx/arch/user-authn-delete-deprecated
User Authn: Remove deprecated, ENABLE_COMBINED_LOGIN_REGISTRATION
2019-10-29 09:37:53 -04:00
Nimisha Asthagiri
db42c7e1e2 User Authn: Remove deprecated, ENABLE_COMBINED_LOGIN_REGISTRATION 2019-10-29 08:57:58 -04:00
Manjinder Singh
80c7f5af01 BOM-933: Fix type mismatches in various migrations 5 (#22147)
* fix type mismatch in third_party_auth migrations

* fix type mismatch in verify_student  migrations

* fix type mismatch in video_config  migrations

* fix type mismatch in verified_track_content  migrations

* fix type mismatch in commercemigrations

* fix type mismatch in xblock_config migrations

* fix type mismatch in course_creators migrations

* fix type mismatch in contentstore migrations
2019-10-24 16:08:04 -04:00
Zach Hancock
a350d327de complete waiting enrollments. fixed 2019-05-24 13:47:49 -04:00
Jeremy Bowman
f9929f32b5 Update quality threshold counts (#20681) 2019-05-24 08:27:54 -04:00
Zach Hancock
afe3cdb3ec user lookup util 2019-04-24 09:47:38 -04:00
Thomas Tracy
f59dc6c820 Fix's bug that does not allow an Oauth2 provider to have different slug and backend_names
Added comment to explain model change.

Removed accidental whitespace.

Another pip issue.
2019-04-09 19:59:55 -04:00
Cory Lee
ac4845d052 DEPR-14 Remove AWS.py 2019-03-28 10:48:34 -04:00
Julia Eskew
368f221f0a Initial start on annotations. 2019-02-19 11:24:21 -05:00
Matthew Piatetsky
9681ca36b8 fix unicode strings in common/ 2019-02-05 10:57:00 -05:00
Saleem Latif
ec2a36b4a4 Third Party Authentication (SSO): Default values for SAML attributes 2018-10-22 11:03:01 +05:00
Nimisha Asthagiri
8cf44283c9 Consolidate user login and authentication code 2018-09-15 03:21:39 -04:00
Tyler Hallada
1540f9ec72 Add on_delete kwarg to ForeignKey & OneToOneFields
Django 2.0 will make this field required for `ForeignKey` and `OneToOneFields`.
In previous versions the option defaulted to `models.CASCADE` when not
specified. This change should make the deprecation warnings in the current
Django version go away.

The migrations where also modified, but the changes should not cause a change in
the database schema since `models.CASCADE` was already the old default.
2018-06-05 17:05:12 -04:00
Brittney Exline
f41bf2f409 ENT-944 Create SSOVerifications for users in tpa pipeline based on provider's settings 2018-04-23 10:10:26 -04:00
Brittney Exline
9a86a67ae0 ENT-943 Cleanup of old third_party_auth provider slug fields 2018-04-10 09:58:31 -04:00