gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis] branch master updated: revise json


From: gnunet
Subject: [taler-anastasis] branch master updated: revise json
Date: Mon, 08 Mar 2021 11:10:47 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new b5b277a  revise json
b5b277a is described below

commit b5b277a2e8c87ec87ed90257ab5a959585a2d976
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Mar 8 11:10:45 2021 +0100

    revise json
---
 contrib/redux.ch.json           | 54 ++++++++++++++++++++++++-----------------
 contrib/redux.de.json           | 49 ++++++++++++++++++++-----------------
 contrib/redux.us.json           | 49 ++++++++++++++++++++++---------------
 contrib/redux.xx.json           | 50 ++++++++++++++++++++++----------------
 src/reducer/Makefile.am         |  3 ++-
 src/reducer/validation_DE_SVN.c | 40 ++++++++++++++++++++++++++++++
 6 files changed, 159 insertions(+), 86 deletions(-)

diff --git a/contrib/redux.ch.json b/contrib/redux.ch.json
index 7e2901e..818c58d 100644
--- a/contrib/redux.ch.json
+++ b/contrib/redux.ch.json
@@ -1,33 +1,43 @@
 {
     "required_attributes": [
        {
-               "type": "string",
-               "name": "full_name",
-               "label": "Full name",
-               "label_i18n":{
-                       "de_DE":"Vollstaendiger Name",
-                       "de_CH":"Vollstaendiger Name"
-                       },
-               "widget": "anastasis_gtk_ia_full_name"
+           "type": "string",
+           "name": "full_name",
+           "label": "Full name",
+           "label_i18n":{
+               "de_DE":"Vollstaendiger Name",
+               "de_CH":"Vollstaendiger Name"
+               "fr": "Nom complet",
+               "en": "Full name"
+           },
+           "widget": "anastasis_gtk_ia_full_name",
+            "uuid" : "9e8f463f-575f-42cb-85f3-759559997331"
        },
        {
            "type": "date",
            "name": "birthdate",
-               "label": "Birthdate",
-           "label_i18n":{"de_CH":"Geburtsdatum"},
-           "widget": "anastasis_gtk_ia_birthdate"
+           "label": "Birthdate",
+           "label_i18n":{
+                "de_CH":"Geburtsdatum"
+               "de_CH":"Geburtsdatum",
+               "fr":"Date de naissance",
+               "en":"Birthdate"
+            },
+           "widget": "anastasis_gtk_ia_birthdate",
+            "uuid" : "83d655c7-bdb6-484d-904e-80c1058c8854"
        },
        {
-               "type": "string",
-               "name": "ahv_number",
-               "label": "AHV number",
-               "label_i18n":{
-                       "de_DE":"AHV-Nummer",
-                       "de_CH":"AHV-Nummer"
-                       },
-               "widget": "anastasis_gtk_ia_ahv",
-               "validation-regex": 
"^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
-               "validation-logic": "CH_AVH_check"
+           "type": "string",
+           "name": "ahv_number",
+           "label": "AHV number",
+           "label_i18n":{
+               "de_DE":"AHV-Nummer",
+               "de_CH":"AHV-Nummer"
+           },
+           "widget": "anastasis_gtk_ia_ahv",
+            "uuid" : "1da87570-ba16-4f62-8a7e-cbda92f51591",
+           "validation-regex": 
"^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
+           "validation-logic": "CH_AVH_check"
        }
-       ]
+    ]
 }
diff --git a/contrib/redux.de.json b/contrib/redux.de.json
index b698d48..1848380 100644
--- a/contrib/redux.de.json
+++ b/contrib/redux.de.json
@@ -3,38 +3,43 @@
        {
            "type": "string",
            "name": "full_name",
-               "label": "Full name",
+           "label": "Full name",
            "label_i18n":{
-                                               "de_DE": "Vollstaendiger Name",
-                                               "de_CH": "Vollstaendiger Name",
-                                               "fr": "Nom complet",
-                                               "en": "Full name"
-                                        },
-           "widget": "anastasis_gtk_ia_full_name"
+               "de_DE": "Vollständiger Name",
+               "de_CH": "Vollständiger Name",
+               "fr": "Nom complet",
+               "en": "Full name"
+           },
+           "widget": "anastasis_gtk_ia_full_name",
+            "uuid" : "9e8f463f-575f-42cb-85f3-759559997331"
        },
        {
            "type": "date",
            "name": "birthdate",
-               "label": "Birthdate",
+           "label": "Birthdate",
            "label_i18n":{
-                                               "de_DE":"Geburtsdatum",
-                                               "de_CH":"Geburtsdatum",
-                                               "fr":"Date de naissance",
-                                               "en":"Birthdate"
-                                       },
-           "widget": "anastasis_gtk_ia_birthdate"
+               "de_DE":"Geburtsdatum",
+               "de_CH":"Geburtsdatum",
+               "fr":"Date de naissance",
+               "en":"Birthdate"
+           },
+           "widget": "anastasis_gtk_ia_birthdate",
+            "uuid" : "83d655c7-bdb6-484d-904e-80c1058c8854"
        },
        {
            "type": "string",
            "name": "social_security_number",
-               "label": "Social security number",
+           "label": "Social security number",
            "label_i18n":{
-                                               "de_DE": 
"Sozialversicherungsnummer",
-                                               "de_CH": 
"Sozialversicherungsnummer",
-                                               "fr": "Numéro de sécurité 
sociale",
-                                               "en": "Social security number"
-                                        },
-           "widget": "anastasis_gtk_ia_ssn"
+               "de_DE": "Deutsche Sozialversicherungsnummer",
+               "de_CH": "Deutsche Sozialversicherungsnummer",
+               "fr": "Numéro de sécurité sociale allemande",
+               "en": "German Social security number"
+           },
+           "widget": "anastasis_gtk_ia_ssn_de",
+            "uuid": "d5e2aa79-1c88-4cf4-a4d2-252508b38e05",
+           "validation-regex": "^d{12}$",
+           "validation-logic": "DE_SVN_check"
        }
-       ]
+    ]
 }
diff --git a/contrib/redux.us.json b/contrib/redux.us.json
index 00f4afb..bb2b967 100644
--- a/contrib/redux.us.json
+++ b/contrib/redux.us.json
@@ -3,33 +3,42 @@
        {
            "type": "string",
            "name": "full_name",
-               "label": "Full name",
-               "label_i18n":{
-                                               "de_DE":"Vollstaendiger Name",
-                                               "de_CH":"Vollstaendiger Name"
-                                        },
-           "widget": "anastasis_gtk_ia_full_name"
-       },
+           "label": "Full name",
+           "label_i18n":{
+               "de_DE": "Vollständiger Name",
+               "de_CH": "Vollständiger Name",
+               "fr": "Nom complet",
+               "en": "Full name"
+           },
+           "widget": "anastasis_gtk_ia_full_name",
+            "uuid" : "9e8f463f-575f-42cb-85f3-759559997331"
+        },
        {
            "type": "date",
            "name": "birthdate",
-               "label": "Birthdate",
-           "label_i18n":{"de_CH":"Geburtsdatum"},
-           "widget": "anastasis_gtk_ia_birthdate"
+           "label": "Birthdate",
+           "label_i18n":{
+               "de_DE":"Geburtsdatum",
+               "de_CH":"Geburtsdatum",
+               "fr":"Date de naissance",
+               "en":"Birthdate"
+            },
+           "widget": "anastasis_gtk_ia_birthdate",
+            "uuid" : "83d655c7-bdb6-484d-904e-80c1058c8854"
        },
        {
            "type": "string",
            "name": "social_security_number",
-               "label": "Social security number",
+           "label": "Social security number",
            "label_i18n":{
-                                               "de_DE": 
"Sozialversicherungsnummer",
-                                               "de_CH": 
"Sozialversicherungsnummer",
-                                               "fr": "Numéro de sécurité 
sociale",
-                                               "en": "Social security number"
-                                        },
-           "widget": "anastasis_gtk_ia_ssn"
+               "de_DE": "US Sozialversicherungsnummer",
+               "de_CH": "US Sozialversicherungsnummer",
+               "fr": "Numéro de sécurité sociale (EU)",
+               "en": "US Social security number"
+           },
+           "widget": "anastasis_gtk_ia_ssn_us",
+            "uuid": "310a138c-b0b7-4985-b8b8-d00e765e9f9b",
+            "validation-regex": 
"^(?!666|000|9\\d{2})\\d{3}-(?!00)\\d{2}-(?!0{4})\\d{4}$"
        }
-       ]
+    ]
 }
-
-
diff --git a/contrib/redux.xx.json b/contrib/redux.xx.json
index 7e2901e..3ca6845 100644
--- a/contrib/redux.xx.json
+++ b/contrib/redux.xx.json
@@ -1,33 +1,41 @@
 {
     "required_attributes": [
        {
-               "type": "string",
-               "name": "full_name",
-               "label": "Full name",
-               "label_i18n":{
-                       "de_DE":"Vollstaendiger Name",
-                       "de_CH":"Vollstaendiger Name"
-                       },
-               "widget": "anastasis_gtk_ia_full_name"
+           "type": "string",
+           "name": "full_name",
+           "label": "Full name",
+           "label_i18n":{
+               "de_DE": "Vollständiger Name",
+               "de_CH": "Vollständiger Name",
+               "fr": "Nom complet",
+               "en": "Full name"
+           },
+           "widget": "anastasis_gtk_ia_full_name",
+            "uuid" : "9e8f463f-575f-42cb-85f3-759559997331"
        },
        {
            "type": "date",
            "name": "birthdate",
-               "label": "Birthdate",
-           "label_i18n":{"de_CH":"Geburtsdatum"},
+           "label": "Birthdate",
+           "label_i18n":{
+               "de_DE":"Geburtsdatum",
+               "de_CH":"Geburtsdatum",
+               "fr":"Date de naissance",
+               "en":"Birthdate"
+            },
            "widget": "anastasis_gtk_ia_birthdate"
        },
        {
-               "type": "string",
-               "name": "ahv_number",
-               "label": "AHV number",
-               "label_i18n":{
-                       "de_DE":"AHV-Nummer",
-                       "de_CH":"AHV-Nummer"
-                       },
-               "widget": "anastasis_gtk_ia_ahv",
-               "validation-regex": 
"^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
-               "validation-logic": "CH_AVH_check"
+           "type": "string",
+           "name": "ahv_number",
+           "label": "AHV number",
+           "label_i18n":{
+               "de_DE":"AHV-Nummer",
+               "de_CH":"AHV-Nummer"
+           },
+           "widget": "anastasis_gtk_ia_ahv",
+           "validation-regex": 
"^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
+           "validation-logic": "CH_AVH_check"
        }
-       ]
+    ]
 }
diff --git a/src/reducer/Makefile.am b/src/reducer/Makefile.am
index 3131760..68c1494 100644
--- a/src/reducer/Makefile.am
+++ b/src/reducer/Makefile.am
@@ -18,7 +18,8 @@ libanastasisredux_la_SOURCES = \
   anastasis_api_redux.c anastasis_api_redux.h \
   anastasis_api_recovery_redux.c \
   anastasis_api_backup_redux.c \
-  validation_CH_AHV.c
+  validation_CH_AHV.c \
+  validation_DE_SVN.c
 libanastasisredux_la_LIBADD = \
   $(top_builddir)/src/restclient/libanastasisrest.la \
   $(top_builddir)/src/lib/libanastasis.la \
diff --git a/src/reducer/validation_DE_SVN.c b/src/reducer/validation_DE_SVN.c
new file mode 100644
index 0000000..06c2a54
--- /dev/null
+++ b/src/reducer/validation_DE_SVN.c
@@ -0,0 +1,40 @@
+/*
+  This file is part of Anastasis
+  Copyright (C) 2020, 2021 Taler Systems SA
+
+  Anastasis is free software; you can redistribute it and/or modify it under 
the
+  terms of the GNU Lesser General Public License as published by the Free 
Software
+  Foundation; either version 3, or (at your option) any later version.
+
+  Anastasis is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+  A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along with
+  Anastasis; see the file COPYING.GPL.  If not, see 
<http://www.gnu.org/licenses/>
+*/
+/**
+ * @file redux/validation_DE_SVN.c
+ * @brief
+ * @author Christian Grothoff
+ * @author Dominik Meister
+ * @author Dennis Neufeld
+ */
+#include <string.h>
+#include <stdbool.h>
+
+/**
+ * Function to validate a German Social Security number.
+ *
+ * See https://www.financescout24.de/wissen/ratgeber/sozialversicherungsnummer
+ * for the structure!
+ *
+ * @param avh_number ahv number to validate (input)
+ * @return true if validation passed, else false
+ */
+bool
+DE_SSN_check (const char *ssn_number)
+{
+  // FIXME: not implemented!
+  return true;
+}

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]