]> CRI, Mines Paris - PSL - photoprint.git/blobdiff - skins/validatePrivateAccess.py
Mise à jour des templates / script pour les inscriptions client.
[photoprint.git] / skins / validatePrivateAccess.py
diff --git a/skins/validatePrivateAccess.py b/skins/validatePrivateAccess.py
new file mode 100755 (executable)
index 0000000..19e3a7d
--- /dev/null
@@ -0,0 +1,16 @@
+##parameters=**kw
+kg = lambda name : kw.get(name,'').strip()
+
+weddingId = kg('wedding_id')
+if not weddingId :
+       return True
+
+else :
+       password = kg('wedding_password')
+       confirm = kg('wedding_password_confirm')
+       memberId = kg('member_id')
+       msg = context.grantAccess(context, weddingId, password, confirm, memberId)
+       if msg :
+               return context.setStatus(False, msg)
+       else :
+               return True