Revision 25769d1b
b/snf-astakos-app/astakos/im/management/commands/user-show.py | ||
---|---|---|
82 | 82 |
[ |
83 | 83 |
('id', user.id), |
84 | 84 |
('uuid', user.uuid), |
85 |
('status', user.status_display), |
|
85 | 86 |
('email', user.email), |
86 | 87 |
('first name', user.first_name), |
87 | 88 |
('last name', user.last_name), |
b/snf-astakos-app/astakos/im/models.py | ||
---|---|---|
544 | 544 |
return self.emailchanges.count() > 0 |
545 | 545 |
|
546 | 546 |
@property |
547 |
def status_display(self): |
|
548 |
msg = "" |
|
549 |
append = None |
|
550 |
if self.is_active: |
|
551 |
msg = "Accepted/Active" |
|
552 |
if self.is_rejected: |
|
553 |
msg = "Rejected" |
|
554 |
if self.rejected_reason: |
|
555 |
msg += " (%s)" % self.rejected_reason |
|
556 |
if not self.email_verified: |
|
557 |
msg = "Pending email verification" |
|
558 |
if not self.moderated: |
|
559 |
msg = "Pending moderation" |
|
560 |
if not self.is_active and self.email_verified: |
|
561 |
msg = "Accepted/Inactive" |
|
562 |
if self.deactivated_reason: |
|
563 |
msg += " (%s)" % (self.deactivated_reason) |
|
564 |
|
|
565 |
if self.moderated and not self.is_rejected: |
|
566 |
if self.accepted_policy == 'manual': |
|
567 |
msg += " (manually accepted)" |
|
568 |
else: |
|
569 |
msg += " (accepted policy: %s)" % \ |
|
570 |
self.accepted_policy |
|
571 |
return msg |
|
572 |
|
|
573 |
@property |
|
547 | 574 |
def signed_terms(self): |
548 | 575 |
term = get_latest_terms() |
549 | 576 |
if not term: |
Also available in: Unified diff