puts organizations out of verification process
This commit is contained in:
@@ -11,7 +11,9 @@ class VerificationController < ApplicationController
|
|||||||
private
|
private
|
||||||
|
|
||||||
def next_step_path(user = current_user)
|
def next_step_path(user = current_user)
|
||||||
if user.level_three_verified?
|
if user.organization?
|
||||||
|
{ path: account_path }
|
||||||
|
elsif user.level_three_verified?
|
||||||
{ path: account_path, notice: t('verification.redirect_notices.already_verified') }
|
{ path: account_path, notice: t('verification.redirect_notices.already_verified') }
|
||||||
elsif user.verification_letter_sent?
|
elsif user.verification_letter_sent?
|
||||||
{ path: edit_letter_path }
|
{ path: edit_letter_path }
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
<div class="row account">
|
<div class="row account">
|
||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
<%= link_to t("account.show.change_credentials_link"), edit_user_registration_path, class: "button radius small secondary right" %>
|
<%= link_to t("account.show.change_credentials_link"), edit_user_registration_path, class: "button radius small secondary right" %>
|
||||||
|
<% unless @account.organization? %>
|
||||||
<div>
|
<div>
|
||||||
<span class="right verify-account">
|
<span class="right verify-account">
|
||||||
<% if current_user.level_three_verified? %>
|
<% if current_user.level_three_verified? %>
|
||||||
<p class="verified">
|
<p class="verified">
|
||||||
<i class="icon-check"></i>
|
<i class="icon-check"></i>
|
||||||
<%= t("account.show.verified_account") %>
|
<%= t("account.show.verified_account") %>
|
||||||
</p>
|
</p>
|
||||||
<% elsif current_user.level_two_verified? %>
|
<% elsif current_user.level_two_verified? %>
|
||||||
<%= link_to t("account.show.finish_verification"), verification_path, class: "button radius small success right" %>
|
<%= link_to t("account.show.finish_verification"), verification_path, class: "button radius small success right" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to t("account.show.verify_my_account"), verification_path, class: "button radius small success right" %>
|
<%= link_to t("account.show.verify_my_account"), verification_path, class: "button radius small success right" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
<h1 class="inline-block"><%= t("account.show.title") %></h1>
|
<h1 class="inline-block"><%= t("account.show.title") %></h1>
|
||||||
|
|
||||||
<%= form_for @account, as: :account, url: account_path do |f| %>
|
<%= form_for @account, as: :account, url: account_path do |f| %>
|
||||||
|
|||||||
@@ -2,6 +2,16 @@ require 'rails_helper'
|
|||||||
|
|
||||||
feature 'Verification path' do
|
feature 'Verification path' do
|
||||||
|
|
||||||
|
scenario "User is an organization" do
|
||||||
|
user = create(:user, verified_at: Time.now)
|
||||||
|
create(:organization, user: user)
|
||||||
|
|
||||||
|
login_as(user)
|
||||||
|
visit verification_path
|
||||||
|
|
||||||
|
expect(current_path).to eq account_path
|
||||||
|
end
|
||||||
|
|
||||||
scenario "User is verified" do
|
scenario "User is verified" do
|
||||||
user = create(:user, verified_at: Time.now)
|
user = create(:user, verified_at: Time.now)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user