X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/174a626682442c7b8513117e91ba6b8e956b818d..de068d5b8a1fd46a70f75f4e20e581ee846f866d:/skins/photo_theme/validatePrivateAccess.py diff --git a/skins/photo_theme/validatePrivateAccess.py b/skins/photo_theme/validatePrivateAccess.py new file mode 100755 index 0000000..19e3a7d --- /dev/null +++ b/skins/photo_theme/validatePrivateAccess.py @@ -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