From 394e9b8fbfac60c2ef6be0472905cf1747b411df Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Fri, 13 Jun 2014 14:37:28 -0400 Subject: [PATCH] Add guards to disbursement options Simple conditionals with instructions in non-available cases. Good enough for now? --- gittip/models/participant.py | 8 +++++++ www/%username/account/close.spt | 39 ++++++++++++++++++++++++++++----- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/gittip/models/participant.py b/gittip/models/participant.py index 075c144ca6..8e4d76015f 100644 --- a/gittip/models/participant.py +++ b/gittip/models/participant.py @@ -149,6 +149,14 @@ def set_session_expires(self, expires): self.set_attributes(session_expires=expires) + # Suspiciousness + # ============== + + @property + def is_whitelisted(self): + return self.is_suspicious is False + + # Claimed-ness # ============ diff --git a/www/%username/account/close.spt b/www/%username/account/close.spt index 983a1cab87..8fce29ffdb 100644 --- a/www/%username/account/close.spt +++ b/www/%username/account/close.spt @@ -50,14 +50,41 @@ if POST: What should we do with it?

If neither option works for you, please