differentiates between level 2 and level 3 users
This commit is contained in:
@@ -3,7 +3,7 @@ module Verification
|
||||
|
||||
included do
|
||||
scope :level_three_verified, -> { where.not(verified_at: nil) }
|
||||
scope :level_two_verified, -> { where("users.level_two_verified_at IS NOT NULL OR (users.confirmed_phone IS NOT NULL AND users.residence_verified_at IS NOT NULL)") }
|
||||
scope :level_two_verified, -> { where("users.level_two_verified_at IS NOT NULL OR (users.confirmed_phone IS NOT NULL AND users.residence_verified_at IS NOT NULL) AND verified_at IS NULL") }
|
||||
scope :level_two_or_three_verified, -> { where("users.verified_at IS NOT NULL OR users.level_two_verified_at IS NOT NULL OR (users.confirmed_phone IS NOT NULL AND users.residence_verified_at IS NOT NULL)") }
|
||||
scope :unverified, -> { where("users.verified_at IS NULL AND (users.level_two_verified_at IS NULL AND (users.residence_verified_at IS NULL OR users.confirmed_phone IS NULL))") }
|
||||
scope :incomplete_verification, -> { where("(users.residence_verified_at IS NULL AND users.failed_census_calls_count > ?) OR (users.residence_verified_at IS NOT NULL AND (users.unconfirmed_phone IS NULL OR users.confirmed_phone IS NULL))", 0) }
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<li><i class="icon-check"></i> <%= t("account.show.user_permission_debates") %></li>
|
||||
<li><i class="icon-check"></i> <%= t("account.show.user_permission_proposal") %></li>
|
||||
<li>
|
||||
<% if current_user.level_two_verified? || current_user.level_three_verified? %>
|
||||
<% if current_user.level_two_or_three_verified? %>
|
||||
<i class="icon-check"></i>
|
||||
<% else %>
|
||||
<i class="icon-x"></i>
|
||||
|
||||
Reference in New Issue
Block a user