Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Remove references to client_id and client_secret from Canvas 3/4 #2222

Merged
merged 3 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions integrated_channels/canvas/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 4.2.15 on 2024-08-30 09:58
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this migration be included in the next release?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise we'll end up with a deployment/migration conflict.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sameeramin ,, @MueezKhan246 can share his experience. He has done similar work recently.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hamzawaleed01 we will be making separate releases for removing columns from model and then for adding migration for that removal. reference issue can get raised otherwise.


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',
),
]
22 changes: 0 additions & 22 deletions integrated_channels/canvas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading