Skip to content

Commit 0565a58

Browse files
author
Thomas Hanke
committed
changes to dataprivacy
1 parent 2a486a2 commit 0565a58

File tree

7 files changed

+384
-392
lines changed

7 files changed

+384
-392
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,18 @@ To install ckanext-matolabtheme:
5858
## Config settings
5959

6060
```bash
61-
CKANINI__CKANEXT__MATOLABTHEME__CONTACT_URL = <url to contact site>
62-
CKANINI__CKANEXT__MATOLABTHEME__LEGAL_PERSON_MD = <Legal Body Address in Markdown>
63-
CKANINI__CKANEXT__MATOLABTHEME__DSVGO_CONTACT_MD = <Contact to adress with dsvgo conflicts in markdown>
61+
CKANINI__CKANEXT__MATOLABTHEME__CONTACT_URL=<url to contact site>
62+
CKANINI__CKANEXT__MATOLABTHEME__LEGAL_PERSON_MD=<Legal Body Address in Markdown>
63+
CKANINI__CKANEXT__MATOLABTHEME__DSVGO_CONTACT_MD=<Contact to adress with dsvgo conflicts in markdown>
64+
CKANINI__CKANEXT__MATOLABTHEME__CONTACT_DP_COMMISSIONER_EMAIL_MD="[[email protected]](mailto:[email protected]?subject=dataprotection ${CKAN_HOST})"
6465
CKANINI__CKAN__FAVICON=/img/favicon.png
6566
```
6667
or ckan.ini parameters.
6768
```bash
6869
ckan.matolabtheme.contact_url = <url to contact site>
6970
ckan.matolabtheme.legal_person_md = <Legal Body Address in Markdown>
7071
ckan.matolabtheme.dsvgo_contact_md = <Contact to adress with dsvgo conflicts in markdown>
72+
ckan.matolabtheme.dsvgo_contact_md = "[[email protected]](mailto:[email protected]?subject=dataprotection]"
7173
ckan.favicon = /img/favicon.png
7274
```
7375
If no contact_url is given, it will relate to the about page!

ckanext/matolabtheme/i18n/ckanext-matolabtheme.pot

Lines changed: 134 additions & 139 deletions
Large diffs are not rendered by default.
-9 Bytes
Binary file not shown.

ckanext/matolabtheme/i18n/de/LC_MESSAGES/ckanext-matolabtheme.po

Lines changed: 206 additions & 216 deletions
Large diffs are not rendered by default.

ckanext/matolabtheme/plugin.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ def declare_config_options(self, declaration: Declaration, key: Key):
8181
declaration.declare(
8282
group.legal_person_md, "legal person name, street number, Zip city, country"
8383
)
84+
declaration.declare(
85+
group.contact_dp_commissioner_email_md,
86+
"[[email protected]](mailto:[email protected]?subject=dataprotection CKAN)",
87+
)
8488
declaration.declare(
8589
group.dsvgo_contact_md,
8690
"legal person name, street number, Zip city, country",

ckanext/matolabtheme/templates/matolabtheme/dataprivacy.html

Lines changed: 26 additions & 28 deletions
Large diffs are not rendered by default.

ckanext/matolabtheme/views.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ def post(self) -> Union[str, Response]:
2828
try:
2929
context: Context = {
3030
"user": current_user.name,
31-
"auth_user_obj": current_user
31+
"auth_user_obj": current_user,
3232
}
33-
logic.check_access(u'sysadmin', context)
33+
logic.check_access("sysadmin", context)
3434
except logic.NotAuthorized:
35-
base.abort(403, _(u'Need to be system administrator to administer'))
35+
base.abort(403, _("Need to be system administrator to administer"))
3636
try:
3737
req = request.form.copy()
3838
req.update(request.files.to_dict())
@@ -108,11 +108,11 @@ def get(self) -> str:
108108
try:
109109
context: Context = {
110110
"user": current_user.name,
111-
"auth_user_obj": current_user
111+
"auth_user_obj": current_user,
112112
}
113-
logic.check_access(u'sysadmin', context)
113+
logic.check_access("sysadmin", context)
114114
except logic.NotAuthorized:
115-
base.abort(403, _(u'Need to be system administrator to administer'))
115+
base.abort(403, _("Need to be system administrator to administer"))
116116
schema = ckan.logic.schema.update_configuration_schema()
117117
data = {}
118118
for key in schema:
@@ -133,6 +133,9 @@ def get(self):
133133
"dsvgo_contact_md": toolkit.config.get(
134134
"ckanext.matolabtheme.dsvgo_contact_md"
135135
),
136+
"contact_dp_commissioner_email_md": toolkit.config.get(
137+
"ckanext.matolabtheme.contact_dp_commissioner_email_md"
138+
),
136139
},
137140
)
138141

0 commit comments

Comments
 (0)