Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions common/djangoapps/third_party_auth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,17 +681,21 @@ class SAMLProviderConfig(ProviderConfig):
default_last_name = models.CharField(
max_length=255, blank=True, verbose_name="Default Value for Last Name",
help_text="Default value for last name to be used if not present in SAML response.")
# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
attr_username = models.CharField(
max_length=128, blank=True, verbose_name="Username Hint Attribute",
help_text="URN of SAML attribute to use as a suggested username for this user. Leave blank for default."
)
# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
default_username = models.CharField(
max_length=255, blank=True, verbose_name="Default Value for Username",
help_text="Default value for username to be used if not present in SAML response."
)
# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
attr_email = models.CharField(
max_length=128, blank=True, verbose_name="Email Attribute",
help_text="URN of SAML attribute containing the user's email address[es]. Leave blank for default.")
# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
default_email = models.CharField(
max_length=255, blank=True, verbose_name="Default Value for Email",
help_text="Default value for email to be used if not present in SAML response."
Expand Down Expand Up @@ -739,6 +743,7 @@ class SAMLProviderConfig(ProviderConfig):
"for trusted providers that are known to provide accurate user information."
),
)
# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
skip_email_verification = models.BooleanField(

@robrap robrap Aug 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Akanshu-2u: If it is simple, an enhancement to consider is to have the linter skip anything that is a BooleanField.

default=True,
help_text=_(
Expand Down
2 changes: 2 additions & 0 deletions lms/djangoapps/bulk_email/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ class Meta:
course_id = CourseKeyField(db_index=True, unique=True)

# Whether or not to enable instructor email
# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
email_enabled = models.BooleanField(default=False) # noqa: DJ012

@classmethod
Expand Down Expand Up @@ -494,6 +495,7 @@ class BulkEmailFlag(ConfigurationModel):
.. toggle_creation_date: 2016-05-05
"""
# boolean field 'enabled' inherited from parent ConfigurationModel
# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
require_course_email_auth = models.BooleanField(default=True)

@classmethod
Expand Down
1 change: 1 addition & 0 deletions lms/djangoapps/course_goals/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class Meta:
verbose_name_plural = "Course goal reminder statuses"

goal = models.OneToOneField(CourseGoal, on_delete=models.CASCADE, related_name='reminder_status')
# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
email_reminder_sent = models.BooleanField(
default=False, help_text='Tracks if the email reminder to complete the Course Goal has been sent this week.'
)
Expand Down
1 change: 1 addition & 0 deletions lms/djangoapps/courseware/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ class FinancialAssistanceConfiguration(ConfigurationModel):
help_text=_('Financial Assistance Backend API Base URL.')
)

# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
service_username = models.CharField(
max_length=100,
default='financial_assistance_service_user',
Expand Down
1 change: 1 addition & 0 deletions openedx/core/djangoapps/catalog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class CatalogIntegration(ConfigurationModel):
)
)

# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
service_username = models.CharField(
max_length=100,
default='lms_catalog_service_user',
Expand Down
4 changes: 3 additions & 1 deletion openedx/core/djangoapps/content/course_overviews/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ class CourseOverview(TimeStampedModel):
will cause a slew of modulestore reads as each course needs to be re-cached into
the course overview.

.. no_pii:
.. pii: Contains proctoring_escalation_email, a staff contact address copied from CourseFields.
.. pii_types: email_address
.. pii_retirement: retained
"""

class Meta:
Expand Down
14 changes: 11 additions & 3 deletions openedx/core/djangoapps/credit/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class CreditProvider(TimeStampedModel):
)
)

# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
eligibility_email_message = models.TextField(
default="",
help_text=gettext_lazy(
Expand All @@ -124,6 +125,7 @@ class CreditProvider(TimeStampedModel):
)
)

# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
receipt_email_message = models.TextField(
default="",
help_text=gettext_lazy(
Expand Down Expand Up @@ -424,7 +426,9 @@ class CreditRequirementStatus(TimeStampedModel):

In case (3), no CreditRequirementStatus record will exist for the requirement and user.

.. no_pii:
.. pii: Contains username, anonymized by retire_user().
.. pii_types: username
.. pii_retirement: local_api
"""

REQUIREMENT_STATUS_CHOICES = (
Expand Down Expand Up @@ -545,7 +549,9 @@ class CreditEligibility(TimeStampedModel):
"""
A record of a user's eligibility for credit for a specific course.

.. no_pii:
.. pii: Contains username, anonymized by retire_user().
.. pii_types: username
.. pii_retirement: local_api
"""
username = models.CharField(max_length=255, db_index=True)
course = models.ForeignKey(CreditCourse, related_name="eligibilities", on_delete=models.CASCADE)
Expand Down Expand Up @@ -658,7 +664,9 @@ class CreditRequest(TimeStampedModel):
(perhaps because the user did not finish filling in forms on the credit provider's site),
the request record will be updated, but the UUID will remain the same.

.. no_pii:
.. pii: Contains username, anonymized by retire_user().
.. pii_types: username
.. pii_retirement: local_api
"""

uuid = models.CharField(max_length=32, unique=True, db_index=True)
Expand Down
1 change: 1 addition & 0 deletions openedx/core/djangoapps/django_comment_common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ class CourseDiscussionSettings(models.Model): # noqa: DJ008
help_text="Key/value store mapping discussion IDs to discussion XBlock usage keys.",
)
always_divide_inline_discussions = models.BooleanField(default=False)
# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
reported_content_email_notifications = models.BooleanField(default=False)
_divided_discussions = models.TextField(db_column='divided_discussions', null=True, blank=True) # JSON list # noqa: DJ001 # pylint: disable=line-too-long

Expand Down
5 changes: 5 additions & 0 deletions openedx/core/djangoapps/notifications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,15 @@ class Notification(TimeStampedModel):
content_context = models.JSONField(default=dict)
content_url = models.URLField(null=True, blank=True) # noqa: DJ001
web = models.BooleanField(default=True, null=False, blank=False)
# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
email = models.BooleanField(default=False, null=False, blank=False)
push = models.BooleanField(default=False, null=False, blank=False)
last_read = models.DateTimeField(null=True, blank=True)
last_seen = models.DateTimeField(null=True, blank=True)
group_by_id = models.CharField(max_length=255, db_index=True, null=False, default="")
# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
email_sent_on = models.DateTimeField(null=True, blank=True)
# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
email_scheduled = models.BooleanField(
default=False,
db_index=True,
Expand Down Expand Up @@ -101,7 +104,9 @@ class Meta:
app = models.CharField(max_length=128, null=False, blank=False, db_index=True)
web = models.BooleanField(default=True, null=False, blank=False)
push = models.BooleanField(default=False, null=False, blank=False)
# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
email = models.BooleanField(default=False, null=False, blank=False)
# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
email_cadence = models.CharField(max_length=64, choices=EmailCadenceChoices.choices, null=False, blank=False)
is_active = models.BooleanField(default=True)

Expand Down
1 change: 1 addition & 0 deletions openedx/core/djangoapps/video_pipeline/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class VEMPipelineIntegration(ConfigurationModel):
help_text=_('video encode manager API URL.')
)

# pylint: disable-next=pii-invalid-no-pii-annotation # field does not store user PII data, safe under OEP-30
service_username = models.CharField(
max_length=100,
default='vem_service_user',
Expand Down
11 changes: 9 additions & 2 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
# SERIOUSLY.
#
# ------------------------------
# Generated by edx-lint version: 6.1.0
# Generated by edx-lint version: 6.2.0
# ------------------------------
[MASTER]
ignore = ,.git,.tox,migrations,node_modules,.pycharm_helpers
Expand Down Expand Up @@ -257,6 +257,8 @@ enable =
deprecated-pragma,
unrecognized-inline-option,
useless-suppression,

pii-invalid-no-pii-annotation,
disable =
bad-indentation,
broad-exception-raised,
Expand Down Expand Up @@ -414,4 +416,9 @@ int-import-graph =
[EXCEPTIONS]
overgeneral-exceptions = builtins.Exception

# 0dccd7f4e438532146a49ea3d1399db32add6e4d
[PII]
pii-terms =
email,
username

# e72ecbe0cf2f12ac71fdd2c33dc7bfb778f81c6e
2 changes: 1 addition & 1 deletion requirements/edx/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ edx-event-bus-redis==1.0.0
# via openedx-platform
edx-i18n-tools==2.0.0
# via ora2
edx-lint==6.1.0
edx-lint==6.2.0
edx-milestones==2.0.0
# via openedx-platform
edx-opaque-keys==4.0.0
Expand Down
6 changes: 3 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading