From 3dfd236aba21e52f1204a528952901d2cb7bbf8a Mon Sep 17 00:00:00 2001 From: Muhammad Sameer Amin <35958006+sameeramin@users.noreply.github.com> Date: Fri, 30 Aug 2024 15:31:43 +0500 Subject: [PATCH 1/3] feat: Remove client_id and client_secret from CanvasEnterpriseCustomerConfiguration --- integrated_channels/canvas/admin/__init__.py | 4 ++-- ...ustomerconfiguration_client_id_and_more.py | 21 ++++++++++++++++++ integrated_channels/canvas/models.py | 22 ------------------- 3 files changed, 23 insertions(+), 24 deletions(-) create mode 100644 integrated_channels/canvas/migrations/0038_remove_canvasenterprisecustomerconfiguration_client_id_and_more.py diff --git a/integrated_channels/canvas/admin/__init__.py b/integrated_channels/canvas/admin/__init__.py index fab5df5520..5625b0d61f 100644 --- a/integrated_channels/canvas/admin/__init__.py +++ b/integrated_channels/canvas/admin/__init__.py @@ -19,8 +19,8 @@ class CanvasEnterpriseCustomerConfigurationAdmin(DjangoObjectActions, admin.Mode """ list_display = ( "enterprise_customer_name", - "client_id", - "client_secret", + "decrypted_client_id", + "decrypted_client_secret", "canvas_account_id", "canvas_base_url", ) diff --git a/integrated_channels/canvas/migrations/0038_remove_canvasenterprisecustomerconfiguration_client_id_and_more.py b/integrated_channels/canvas/migrations/0038_remove_canvasenterprisecustomerconfiguration_client_id_and_more.py new file mode 100644 index 0000000000..f4962adf57 --- /dev/null +++ b/integrated_channels/canvas/migrations/0038_remove_canvasenterprisecustomerconfiguration_client_id_and_more.py @@ -0,0 +1,21 @@ +# Generated by Django 4.2.15 on 2024-08-30 09:58 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('canvas', '0037_canvasenterprisecustomerconfiguration_copy_id_and_secret_and_more'), + ] + + operations = [ + migrations.RemoveField( + model_name='canvasenterprisecustomerconfiguration', + name='client_id', + ), + migrations.RemoveField( + model_name='canvasenterprisecustomerconfiguration', + name='client_secret', + ), + ] diff --git a/integrated_channels/canvas/models.py b/integrated_channels/canvas/models.py index b7bf02017e..2620803f1f 100644 --- a/integrated_channels/canvas/models.py +++ b/integrated_channels/canvas/models.py @@ -35,17 +35,6 @@ class CanvasEnterpriseCustomerConfiguration(EnterpriseCustomerPluginConfiguratio Based on: https://canvas.instructure.com/doc/api/file.oauth.html#oauth2-flow-3 """ - client_id = models.CharField( - max_length=255, - blank=True, - default='', - verbose_name="API Client ID", - help_text=_( - "The API Client ID provided to edX by the enterprise customer to be used to make API " - "calls to Canvas on behalf of the customer." - ) - ) - decrypted_client_id = EncryptedCharField( max_length=255, blank=True, @@ -80,17 +69,6 @@ def encrypted_client_id(self, value): """ self.decrypted_client_id = value - client_secret = models.CharField( - max_length=255, - blank=True, - default='', - verbose_name="API Client Secret", - help_text=_( - "The API Client Secret provided to edX by the enterprise customer to be used to make " - " API calls to Canvas on behalf of the customer." - ) - ) - decrypted_client_secret = EncryptedCharField( max_length=255, blank=True, From 210de0179b53b3ad839130e59546c7fa5008aef3 Mon Sep 17 00:00:00 2001 From: Muhammad Sameer Amin <35958006+sameeramin@users.noreply.github.com> Date: Mon, 2 Sep 2024 13:46:40 +0500 Subject: [PATCH 2/3] chore: altered canvasenterprisecustomerconfiguration client id and more --- ...ustomerconfiguration_client_id_and_more.py | 23 +++++++++++++++++++ ...ustomerconfiguration_client_id_and_more.py | 21 ----------------- 2 files changed, 23 insertions(+), 21 deletions(-) create mode 100644 integrated_channels/canvas/migrations/0038_alter_canvasenterprisecustomerconfiguration_client_id_and_more.py delete mode 100644 integrated_channels/canvas/migrations/0038_remove_canvasenterprisecustomerconfiguration_client_id_and_more.py diff --git a/integrated_channels/canvas/migrations/0038_alter_canvasenterprisecustomerconfiguration_client_id_and_more.py b/integrated_channels/canvas/migrations/0038_alter_canvasenterprisecustomerconfiguration_client_id_and_more.py new file mode 100644 index 0000000000..93de0269ac --- /dev/null +++ b/integrated_channels/canvas/migrations/0038_alter_canvasenterprisecustomerconfiguration_client_id_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.15 on 2024-09-02 08:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('canvas', '0037_canvasenterprisecustomerconfiguration_copy_id_and_secret_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='canvasenterprisecustomerconfiguration', + name='client_id', + field=models.CharField(blank=True, default='', help_text='The API Client ID provided to edX by the enterprise customer to be used to make API calls to Canvas on behalf of the customer.', max_length=255, null=True, verbose_name='API Client ID'), + ), + migrations.AlterField( + model_name='canvasenterprisecustomerconfiguration', + name='client_secret', + field=models.CharField(blank=True, default='', help_text='The API Client Secret provided to edX by the enterprise customer to be used to make API calls to Canvas on behalf of the customer.', max_length=255, null=True, verbose_name='API Client Secret'), + ), + ] diff --git a/integrated_channels/canvas/migrations/0038_remove_canvasenterprisecustomerconfiguration_client_id_and_more.py b/integrated_channels/canvas/migrations/0038_remove_canvasenterprisecustomerconfiguration_client_id_and_more.py deleted file mode 100644 index f4962adf57..0000000000 --- a/integrated_channels/canvas/migrations/0038_remove_canvasenterprisecustomerconfiguration_client_id_and_more.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 4.2.15 on 2024-08-30 09:58 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('canvas', '0037_canvasenterprisecustomerconfiguration_copy_id_and_secret_and_more'), - ] - - operations = [ - migrations.RemoveField( - model_name='canvasenterprisecustomerconfiguration', - name='client_id', - ), - migrations.RemoveField( - model_name='canvasenterprisecustomerconfiguration', - name='client_secret', - ), - ] From cc3d64cc007d05fdb9a8e35dd7c5017198501b24 Mon Sep 17 00:00:00 2001 From: Muhammad Sameer Amin <35958006+sameeramin@users.noreply.github.com> Date: Mon, 2 Sep 2024 13:56:45 +0500 Subject: [PATCH 3/3] chore: bumped version to 4.23.16 and updated changelog --- CHANGELOG.rst | 4 ++++ enterprise/__init__.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 14abbd18cb..3f46aac621 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,10 @@ Unreleased ---------- * nothing unreleased +[4.23.16] +---------- +* feat: remove references to client_id and client_secret from CanvasEnterpriseCustomerConfiguration + [4.23.15] ---------- * feat: altered decrypted_secret to be encrypted and made credentials nullable diff --git a/enterprise/__init__.py b/enterprise/__init__.py index b977ea46c7..dfe1f750dc 100644 --- a/enterprise/__init__.py +++ b/enterprise/__init__.py @@ -2,4 +2,4 @@ Your project description goes here. """ -__version__ = "4.23.15" +__version__ = "4.23.16"