Implémentation de la remise.
[photoprint.git] / skins / validatePrivateAccess.py
1 ##parameters=**kw
2 from Products.photoprint.utils import grantAccess
3 kg = lambda name : kw.get(name,'').strip()
4
5 collectionId = kg('collection_id')
6 if not collectionId :
7 return True
8
9 else :
10 password = kg('collection_password')
11 confirm = kg('collection_password_confirm')
12 memberId = kg('member_id')
13 msg = grantAccess(collectionId, password, confirm, memberId)
14 if msg :
15 return context.setStatus(False, msg)
16 else :
17 return True