Make token message and/or link configurable #27

Closed
opened 2025-04-28 12:36:15 +00:00 by jsheunis · 2 comments
Owner

This is currently hardcoded:

A token is required to submit new/updated metadata records to the server,
or to view previously submitted metadata records.
<br><br>
Please read the <a href="https://docs.trr379.de/rdm/metadata-edit/index.html">metadata management docs</a> to find out how to acquire a token.
![](https://hub.psychoinformatics.de/attachments/f7705dd1-5b0b-469c-b1d6-f381acb576cb) This is currently hardcoded: ```html A token is required to submit new/updated metadata records to the server, or to view previously submitted metadata records. <br><br> Please read the <a href="https://docs.trr379.de/rdm/metadata-edit/index.html">metadata management docs</a> to find out how to acquire a token. ```
Owner

I made the following config change:

diff --git a/config.json b/config.json
index 3f9aa65..78e89b3 100644
--- a/config.json
+++ b/config.json
@@ -92,8 +92,8 @@
     "class_name_display": "name",
     "use_service": true,
     "use_token": true,
-    "token_info": "",
-    "token_info_url": "",
+    "token_info": "Please contact Michael Hanke for any access requests.",
+    "token_info_url": "https://www.fz-juelich.de/profile/hanke_m",
     "service_base_url": "https://metadata.inm7.de/simpleinput-unreleased/",
     "service_endpoints":  {
         "post-record": "record/{name}?format=ttl",

This changes the URL in the text that is shown above, but the value of token_info seems to be ignored, hence the URL makes no sense, also.

Unclear how this feature can/should be used.

I made the following config change: ```diff diff --git a/config.json b/config.json index 3f9aa65..78e89b3 100644 --- a/config.json +++ b/config.json @@ -92,8 +92,8 @@ "class_name_display": "name", "use_service": true, "use_token": true, - "token_info": "", - "token_info_url": "", + "token_info": "Please contact Michael Hanke for any access requests.", + "token_info_url": "https://www.fz-juelich.de/profile/hanke_m", "service_base_url": "https://metadata.inm7.de/simpleinput-unreleased/", "service_endpoints": { "post-record": "record/{name}?format=ttl", ``` This changes the URL in the text that is shown above, but the value of `token_info` seems to be ignored, hence the URL makes no sense, also. Unclear how this feature can/should be used.
Author
Owner

config currently allows for specifying a message, and a link, and they will be displayed in succession if provided.

config currently allows for specifying a message, and a link, and they will be displayed in succession if provided.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
inm7/annotate.inm7.de-simplesubmit#27
No description provided.