Skip to content

Commit

Permalink
feat: rename data authorization
Browse files Browse the repository at this point in the history
Rename the data_authorization field of NauUserExtendedModel.
The motivation is that we need to add multiple authorization
checkboxes to the register page, requested by the DPO.

fccn/nau-technical#83
  • Loading branch information
igobranco committed Apr 12, 2024
1 parent 83c62e5 commit fc0a21d
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 50 deletions.
7 changes: 5 additions & 2 deletions nau_openedx_extensions/custom_registration_form/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class NauUserExtendedModel(models.Model):
"""
Holds data autorization field
Holds data authorization field
Used during user registration as a form extension.
"""

Expand All @@ -37,7 +37,10 @@ class NauUserExtendedModel(models.Model):

user = models.OneToOneField(USER_MODEL, on_delete=models.CASCADE, null=True)
data_authorization = models.BooleanField(
verbose_name=_("I authorize data processing for this site "), default=False
verbose_name=_(
"I have read and understood the <a href='https://www.nau.edu.pt/legal/politica-de-privacidade/' "
"rel='noopener' target='_blank'>Privacy Policy</a>"
), default=False
)
nif = models.CharField(
verbose_name=_("NIF"), max_length=9, blank=True, null=True
Expand Down
Binary file modified nau_openedx_extensions/locale/en/LC_MESSAGES/django.mo
Binary file not shown.
55 changes: 31 additions & 24 deletions nau_openedx_extensions/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2023-07-03 17:12+0100\n"
"POT-Creation-Date: 2024-04-12 17:07+0100\n"
"PO-Revision-Date: 2021-02-15 15:56+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
Expand All @@ -22,85 +22,86 @@ msgstr ""
msgid "Please authorize data processing"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:30
#: nau_openedx_extensions/custom_registration_form/models.py:33
msgid "Student"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:31
#: nau_openedx_extensions/custom_registration_form/models.py:34
msgid "Unemployed"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:32
#: nau_openedx_extensions/custom_registration_form/models.py:35
msgid "Public service contract"
msgstr "Public institution contract"

#: nau_openedx_extensions/custom_registration_form/models.py:33
#: nau_openedx_extensions/custom_registration_form/models.py:36
msgid "Private institution contract"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:34
#: nau_openedx_extensions/custom_registration_form/models.py:37
msgid "Self employed entrepreneur"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:35
#: nau_openedx_extensions/custom_registration_form/models.py:38
msgid "Other"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:40
msgid "I authorize data processing for this site "
#: nau_openedx_extensions/custom_registration_form/models.py:43
msgid ""
"I have read and understood the <a href='https://www.nau.edu.pt/legal"
"/politica-de-privacidade/' rel='noopener' target='_blank'>Privacy "
"Policy</a>"
msgstr ""
"I authorize data to be processed according to terms of service and "
"privacy policy"

#: nau_openedx_extensions/custom_registration_form/models.py:43
#: nau_openedx_extensions/custom_registration_form/models.py:48
msgid "NIF"
msgstr "NIF - Portuguese VAT identification number"

#: nau_openedx_extensions/custom_registration_form/models.py:46
#: nau_openedx_extensions/custom_registration_form/models.py:51
msgid "CC NIF"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:49
#: nau_openedx_extensions/custom_registration_form/models.py:54
msgid "CC NIC"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:52
#: nau_openedx_extensions/custom_registration_form/models.py:57
msgid "CC NIC Check Digit"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:55
#: nau_openedx_extensions/custom_registration_form/models.py:60
msgid "CC First name"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:57
#: nau_openedx_extensions/custom_registration_form/models.py:62
msgid "CC Last name"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:59
#: nau_openedx_extensions/custom_registration_form/models.py:64
msgid "CC Nacionality"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:62
#: nau_openedx_extensions/custom_registration_form/models.py:67
msgid "CC Zip code 3 digits"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:65
#: nau_openedx_extensions/custom_registration_form/models.py:70
msgid "CC Zip code 4 digits"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:68
#: nau_openedx_extensions/custom_registration_form/models.py:73
msgid "CC Document number"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:71
#: nau_openedx_extensions/custom_registration_form/models.py:76
msgid "CC Birth date"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:74
#: nau_openedx_extensions/custom_registration_form/models.py:79
msgid "Employment situation"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:77
#: nau_openedx_extensions/custom_registration_form/models.py:82
msgid "Allow newsletter"
msgstr ""
"I agree to receive information regarding the courses offered by NAU, as "
Expand Down Expand Up @@ -163,3 +164,9 @@ msgstr ""
msgid "Send Message"
msgstr ""

#~ msgid "I have read and understood the Privacy Policy"
#~ msgstr ""
#~ "I authorize data to be processed "
#~ "according to terms of service and "
#~ "privacy policy"

Binary file modified nau_openedx_extensions/locale/pt_PT/LC_MESSAGES/django.mo
Binary file not shown.
51 changes: 27 additions & 24 deletions nau_openedx_extensions/locale/pt_PT/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2023-07-03 17:12+0100\n"
"POT-Creation-Date: 2024-04-12 17:07+0100\n"
"PO-Revision-Date: 2021-02-15 15:56+0000\n"
"Last-Translator: Ivo Branco <[email protected]>\n"
"Language: pt_PT\n"
Expand All @@ -22,85 +22,88 @@ msgstr ""
msgid "Please authorize data processing"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:30
#: nau_openedx_extensions/custom_registration_form/models.py:33
msgid "Student"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:31
#: nau_openedx_extensions/custom_registration_form/models.py:34
msgid "Unemployed"
msgstr "Desempregado"

#: nau_openedx_extensions/custom_registration_form/models.py:32
#: nau_openedx_extensions/custom_registration_form/models.py:35
msgid "Public service contract"
msgstr "Contrato em instituição pública"

#: nau_openedx_extensions/custom_registration_form/models.py:33
#: nau_openedx_extensions/custom_registration_form/models.py:36
msgid "Private institution contract"
msgstr "Contrato em instituição privada"

#: nau_openedx_extensions/custom_registration_form/models.py:34
#: nau_openedx_extensions/custom_registration_form/models.py:37
msgid "Self employed entrepreneur"
msgstr "Trabalhador independente/empresário"

#: nau_openedx_extensions/custom_registration_form/models.py:35
#: nau_openedx_extensions/custom_registration_form/models.py:38
msgid "Other"
msgstr "Outro"

#: nau_openedx_extensions/custom_registration_form/models.py:40
msgid "I authorize data processing for this site "
#: nau_openedx_extensions/custom_registration_form/models.py:43
msgid ""
"I have read and understood the <a href='https://www.nau.edu.pt/legal"
"/politica-de-privacidade/' rel='noopener' target='_blank'>Privacy "
"Policy</a>"
msgstr ""
"Autorizo que os dados sejam processados segundo os termos de serviço e "
"política de privacidade"
"Li e compreendi a <a href='https://www.nau.edu.pt/legal/politica-de-"
"privacidade/' rel='noopener' target='_blank'>Política de Privacidade</a>"

#: nau_openedx_extensions/custom_registration_form/models.py:43
#: nau_openedx_extensions/custom_registration_form/models.py:48
msgid "NIF"
msgstr "NIF - Nº de Identificação Fiscal"

#: nau_openedx_extensions/custom_registration_form/models.py:46
#: nau_openedx_extensions/custom_registration_form/models.py:51
msgid "CC NIF"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:49
#: nau_openedx_extensions/custom_registration_form/models.py:54
msgid "CC NIC"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:52
#: nau_openedx_extensions/custom_registration_form/models.py:57
msgid "CC NIC Check Digit"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:55
#: nau_openedx_extensions/custom_registration_form/models.py:60
msgid "CC First name"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:57
#: nau_openedx_extensions/custom_registration_form/models.py:62
msgid "CC Last name"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:59
#: nau_openedx_extensions/custom_registration_form/models.py:64
msgid "CC Nacionality"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:62
#: nau_openedx_extensions/custom_registration_form/models.py:67
msgid "CC Zip code 3 digits"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:65
#: nau_openedx_extensions/custom_registration_form/models.py:70
msgid "CC Zip code 4 digits"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:68
#: nau_openedx_extensions/custom_registration_form/models.py:73
msgid "CC Document number"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:71
#: nau_openedx_extensions/custom_registration_form/models.py:76
msgid "CC Birth date"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:74
#: nau_openedx_extensions/custom_registration_form/models.py:79
msgid "Employment situation"
msgstr "Situação profissional"

#: nau_openedx_extensions/custom_registration_form/models.py:77
#: nau_openedx_extensions/custom_registration_form/models.py:82
msgid "Allow newsletter"
msgstr ""
"Aceito receber informações no âmbito dos cursos disponibilizados pela "
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 3.2.16 on 2024-04-12 15:20

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('nau_openedx_extensions', '0007_auto_20220223_1158'),
]

operations = [
migrations.DeleteModel(
name='CourseAccessRoleProxy',
),
migrations.AlterField(
model_name='nauuserextendedmodel',
name='data_authorization',
field=models.BooleanField(default=False, verbose_name="I have read and understood the <a href='https://www.nau.edu.pt/legal/politica-de-privacidade/' rel='noopener' target='_blank'>Privacy Policy</a>"),
),
]

0 comments on commit fc0a21d

Please sign in to comment.