Skip to content
Commits on Source (4)
......@@ -2,3 +2,5 @@ tests/
keys/
cert.pem
key.pem
void.py
*.pyc
......@@ -403,7 +403,6 @@ def do_login():
else:
session[ "need_to_check" ].remove( current_check )
############################################################################
# Check if all the data has been provided; login if ok
......@@ -543,7 +542,7 @@ def password_reset_stage2( user_id ):
} )
else:
return my_render_template(
return my_render_template(
"users/password_reset_stage2.html",
user_id = user_id
)
......@@ -563,7 +562,7 @@ def webauthn_admin():
"""
Serve the administartion page for the FIDO2 keys.
"""
return my_render_template(
return my_render_template(
"webauthn/admin.html",
keys = do_webauthn_get_list_of_keys( all_keys = True )
)
......@@ -658,9 +657,9 @@ def webauthn_verify():
} )
try:
config.db.query(
config.db.query(
sql_insert_generate( "webauthn", [ "user_id", "key_name", "ukey", "credential_id", "pub_key", "sign_count" ] ),
(
(
user_id, key_name,
ukey, webauthn_credential.credential_id,
webauthn_credential.public_key, webauthn_credential.sign_count,
......@@ -866,7 +865,7 @@ def new_user():
for rr in r:
account_type.append( dict( rr ) )
return my_render_template(
return my_render_template(
"users/signin.html",
list_account_type = account_type
)
......@@ -928,7 +927,7 @@ def validate_signin():
except:
pass
return my_render_template(
return my_render_template(
"users/validate_signin.html",
users = users
)
......@@ -1104,7 +1103,7 @@ def config_new_user( uuid ):
session[ "signin_user_validation_email" ] = email
session[ "signin_user_validation_uuid" ] = uuid
return my_render_template(
return my_render_template(
"users/config.html",
next_step = "do_config_new_user"
)
......@@ -1197,7 +1196,7 @@ def config_new_user_donor( h ):
session[ "email_hash" ] = h
session[ "user_id" ] = user[ "id" ]
return my_render_template(
return my_render_template(
"users/config.html",
next_step = "do_config_new_donor",
hash = h
......@@ -1322,7 +1321,7 @@ def user_totp_config():
"""
Serve the TOTP configuration page.
"""
return my_render_template(
return my_render_template(
"users/totp.html",
secret = get_secret()
)
......@@ -1576,7 +1575,7 @@ def upload_file():
"format", "size", "width", "height", "resolution",
"uuid", "data"
] )
data = (
data = (
submission_id, session[ "user_id" ],
file_name, upload_type_id,
img_format, file_size, width, height, res,
......@@ -1683,7 +1682,7 @@ def submission_upload_tplp( submission_id ):
for key in [ "email", "nickname" ]:
user[ key ] = do_decrypt( user[ key ] )
return my_render_template(
return my_render_template(
"submission/add_files.html",
submission_id = submission_id,
**user
......@@ -1715,7 +1714,7 @@ def submission_consent_form( submission_id ):
for key in [ "email", "nickname" ]:
user[ key ] = do_decrypt( user[ key ] )
return my_render_template(
return my_render_template(
"submission/consent_form.html",
submission_id = submission_id,
**user
......@@ -1778,7 +1777,7 @@ def submission_list():
"uuid": donor.get( "uuid", None )
} )
return my_render_template(
return my_render_template(
"submission/list.html",
donors = donors
)
......@@ -1817,7 +1816,7 @@ def submission_latent_list( submission_id, latent_type = "all" ):
v[ "filename" ] = do_decrypt( v[ "filename" ] )
v[ "size" ] = round( ( float( v[ "size" ] ) / ( 1024 * 1024 ) ) * 100 ) / 100
return my_render_template(
return my_render_template(
"submission/latent_list.html",
submission_id = submission_id,
latent_type = latent_type,
......@@ -1860,7 +1859,7 @@ def submission_latent( submission_id, latent_id ):
latent[ "note" ] = do_decrypt( latent[ "note" ] )
latent[ "file_type" ] = latent[ "file_type" ].replace( "latent_", "" )
return my_render_template(
return my_render_template(
"submission/latent.html",
submission_id = submission_id,
nickname = nickname,
......@@ -1910,7 +1909,7 @@ def submission_latent_pfsp( submission_id, latent_id ):
if z[ "desc" ] == current_pfsp:
current_pfsp = ",".join( z[ "sel" ] )
return my_render_template(
return my_render_template(
"submission/latent_pfsp.html",
submission_id = submission_id,
nickname = nickname,
......@@ -2028,7 +2027,7 @@ def image_file_serve( file_id ):
draw = ImageDraw.Draw( img )
font = ImageFont.truetype( "arial.ttf", 18 )
draw.text( ( 0, 0 ), "No preview", 0, font = font )
buff = pil2buffer( img, "PNG" )
return send_file( buff, mimetype = "image/png" )
......@@ -2266,7 +2265,7 @@ def submission_tenprint_list( submission_id ):
"type": tenprint.get( "type", None )
} )
return my_render_template(
return my_render_template(
"submission/tenprint_list.html",
tenprint_cards_front = tenprint_cards[ "1" ],
tenprint_cards_back = tenprint_cards[ "2" ],
......@@ -2353,7 +2352,7 @@ def submission_tenprint( submission_id, tenprint_id ):
img_info = r.fetchone()
svg_hw_factor = float( img_info[ "width" ] ) / float( img_info[ "height" ] )
return my_render_template(
return my_render_template(
"submission/tenprint.html",
submission_id = submission_id,
tenprint_id = tenprint_id,
......@@ -2472,7 +2471,7 @@ def submission_tenprint_segments_list( submission_id, tenprint_id ):
############################################################################
return my_render_template(
return my_render_template(
"submission/segment_list.html",
submission_id = submission_id,
tenprint_id = tenprint_id,
......@@ -2536,7 +2535,7 @@ def submission_segment( submission_id, tenprint_id, pc ):
else:
return abort( 404 )
return my_render_template(
return my_render_template(
"submission/segment.html",
submission_id = submission_id,
nickname = nickname,
......@@ -2621,7 +2620,7 @@ def user_myprofile_tenprint():
"""
tenprint_cards = config.db.query_fetchall( sql, ( session[ "user_id" ], ) )
return my_render_template(
return my_render_template(
"users/profile/tenprint.html",
tenprint_cards = tenprint_cards
)
......@@ -2638,7 +2637,7 @@ def template_tenprint_list():
sql = "SELECT id, country_code, name FROM tenprint_cards ORDER BY name ASC"
tp_templates = config.db.query( sql ).fetchall()
return my_render_template(
return my_render_template(
"tp_template/list.html",
tp_templates = tp_templates
)
......@@ -2660,7 +2659,7 @@ def template_tenprint_new_images( template_id ):
sql = "SELECT id, name, country_code FROM tenprint_cards WHERE id = %s"
card = config.db.query( sql, ( template_id, ) ).fetchone()
return my_render_template(
return my_render_template(
"tp_template/new_images.html",
card = card
)
......@@ -2864,7 +2863,7 @@ def template_tenprint( template_id, side ):
svg_w = float( img_info[ "image_{}_width".format( side ) ] )
svg_hw_factor = svg_w / svg_h
return my_render_template(
return my_render_template(
"tp_template/template.html",
zones = zones,
img_info = img_info,
......
......@@ -10,6 +10,7 @@ SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
......@@ -52,25 +53,32 @@ ALTER TABLE public.gp_id_seq OWNER TO icnml;
ALTER SEQUENCE public.gp_id_seq OWNED BY public.gp.id;
--
-- Name: gp id; Type: DEFAULT; Schema: public; Owner: icnml
--
ALTER TABLE ONLY public.gp ALTER COLUMN id SET DEFAULT nextval('public.gp_id_seq'::regclass);
--
-- Data for Name: gp; Type: TABLE DATA; Schema: public; Owner: icnml
--
INSERT INTO public.gp (id, name, div_name) VALUES (0, 'unknown', 'unknown');
INSERT INTO public.gp (id, name, div_name) VALUES (1, 'loop', 'loop');
INSERT INTO public.gp (id, name, div_name) VALUES (2, 'whorl', 'whorl');
INSERT INTO public.gp (id, name, div_name) VALUES (3, 'arch', 'arch');
INSERT INTO public.gp (id, name, div_name) VALUES (4, 'central pocket loop', 'cpl');
INSERT INTO public.gp (id, name, div_name) VALUES (5, 'double loop', 'dl');
INSERT INTO public.gp (id, name, div_name) VALUES (6, 'missing/amputated', 'ma');
INSERT INTO public.gp (id, name, div_name) VALUES (7, 'scarred/mutilated', 'sm');
INSERT INTO public.gp VALUES (1, 'unknown', 'unknown');
INSERT INTO public.gp VALUES (2, 'loop', 'loop');
INSERT INTO public.gp VALUES (3, 'whorl', 'whorl');
INSERT INTO public.gp VALUES (4, 'arch', 'arch');
INSERT INTO public.gp VALUES (5, 'central pocket loop', 'cpl');
INSERT INTO public.gp VALUES (6, 'double loop', 'dl');
INSERT INTO public.gp VALUES (7, 'missing/amputated', 'ma');
INSERT INTO public.gp VALUES (8, 'scarred/mutilated', 'sm');
--
-- Name: gp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: icnml
--
SELECT pg_catalog.setval('public.gp_id_seq', 4, true);
SELECT pg_catalog.setval('public.gp_id_seq', 8, true);
--
......