Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions app/assets/images/user-access.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions app/assets/stylesheets/components/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,32 @@
img { height: 17px; }
}
}

.sidenav-mobile {
@include at-media('desktop') {
display: none;
}

.usa-nav__close {
@include add-background-svg('close-blue-60v-alt');
@include u-square(6);
background-position: center center;
background-repeat: no-repeat;
}
}

.sidenav {
display: none;

@include at-media('desktop') {
display: block;
}
}

.authnav-greeting {
display: none;

@include at-media('desktop') {
display: block;
}
}
23 changes: 21 additions & 2 deletions app/assets/stylesheets/components/_profile-section.scss
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
.profile-info-box {
border: 0;
border-bottom: $border-width solid $border-color;
border-radius: 0;
margin-bottom: 0;
overflow: hidden;
padding: $space-3;

.bg-lightest-blue img {
margin-top: -2px;
vertical-align: middle;
}
}

@media #{$breakpoint-sm} {
@include at-media('mobile') {
.profile-info-box {
border-radius: $border-radius-md;
margin-bottom: $space-3;
}
}

.events-info-box {
border: $border-width solid $border-color;
border-radius: 0;
margin-bottom: 0;
overflow: hidden;

.bg-lightest-blue img {
margin-top: -2px;
vertical-align: middle;
}
}

@include at-media('mobile') {
.events-info-box {
border: $border-width solid $border-color;
border-radius: $border-radius-md;
margin-bottom: $space-3;
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/components/_util.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@

// Temporary Classes for Overriding during design system migration


.border-top {
border-top: 1px solid $border-color;
}
Expand Down
17 changes: 17 additions & 0 deletions app/controllers/accounts/connected_accounts_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module Accounts
class ConnectedAccountsController < ApplicationController
include RememberDeviceConcern
before_action :confirm_two_factor_authenticated

layout 'account_side_nav'

def show
@view_model = AccountShow.new(
decrypted_pii: nil,
personal_key: flash[:personal_key],
decorated_user: current_user.decorate,
locked_for_session: pii_locked_for_session?(current_user),
)
end
end
end
17 changes: 17 additions & 0 deletions app/controllers/accounts/history_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module Accounts
class HistoryController < ApplicationController
include RememberDeviceConcern
before_action :confirm_two_factor_authenticated

layout 'account_side_nav'

def show
@view_model = AccountShow.new(
decrypted_pii: nil,
personal_key: flash[:personal_key],
decorated_user: current_user.decorate,
locked_for_session: pii_locked_for_session?(current_user),
)
end
end
end
18 changes: 18 additions & 0 deletions app/controllers/accounts/two_factor_authentication_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module Accounts
class TwoFactorAuthenticationController < ApplicationController
include RememberDeviceConcern
before_action :confirm_two_factor_authenticated

layout 'account_side_nav'

def show
session[:account_redirect_path] = account_two_factor_authentication_path
@view_model = AccountShow.new(
decrypted_pii: nil,
personal_key: flash[:personal_key],
decorated_user: current_user.decorate,
locked_for_session: pii_locked_for_session?(current_user),
)
end
end
end
3 changes: 2 additions & 1 deletion app/controllers/accounts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ class AccountsController < ApplicationController
include RememberDeviceConcern
before_action :confirm_two_factor_authenticated

layout 'card_wide'
layout 'account_side_nav'

def show
analytics.track_event(Analytics::ACCOUNT_VISIT)
session[:account_redirect_path] = account_path
cacher = Pii::Cacher.new(current_user, user_session)
@view_model = AccountShow.new(
decrypted_pii: cacher.fetch,
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def after_mfa_setup_path
elsif user_needs_to_reactivate_account?
reactivate_account_url
else
after_sign_in_path_for(current_user)
session[:account_redirect_path] || after_sign_in_path_for(current_user)
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/events_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class EventsController < ApplicationController
include RememberDeviceConcern
before_action :confirm_two_factor_authenticated
layout 'card_wide'
layout 'no_card'

EVENTS_PAGE_SIZE = 25

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/test/telephony_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Test
class TelephonyController < ApplicationController
layout 'card_wide'
layout 'no_card'

before_action :render_not_found_in_production

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/users/backup_code_setup_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def delete
current_user.backup_code_configurations.destroy_all
flash[:success] = t('notices.backup_codes_deleted')
revoke_remember_device(current_user)
redirect_to account_url
redirect_to account_two_factor_authentication_path
end

private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def delete
clear_piv_cac_information
create_user_event(:piv_cac_disabled)
flash[:success] = t('notices.piv_cac_disabled')
redirect_to account_url
redirect_to account_two_factor_authentication_path
end

def submit_new_piv_cac
Expand Down Expand Up @@ -118,8 +118,8 @@ def process_invalid_submission
end

def authorize_piv_cac_disable
return redirect_to account_url unless piv_cac_enabled? &&
MfaPolicy.new(current_user).multiple_factors_enabled?
return if piv_cac_enabled? && MfaPolicy.new(current_user).multiple_factors_enabled?
redirect_to account_two_factor_authentication_path
end

def good_nickname
Expand All @@ -128,7 +128,8 @@ def good_nickname
end

def cap_piv_cac_count
redirect_to account_url if Figaro.env.max_piv_cac_per_account.to_i <= current_cac_count
return unless Figaro.env.max_piv_cac_per_account.to_i <= current_cac_count
redirect_to account_two_factor_authentication_path
end

def current_cac_count
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/users/service_provider_revoke_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class ServiceProviderRevokeController < ApplicationController
before_action :confirm_two_factor_authenticated

rescue_from ActiveRecord::RecordNotFound do
redirect_to account_url
redirect_to account_connected_accounts_path
end

def show
Expand All @@ -19,7 +19,7 @@ def destroy
RevokeServiceProviderConsent.new(identity).call
analytics.track_event(Analytics::SP_REVOKE_CONSENT_REVOKED, issuer: @service_provider.issuer)

redirect_to account_url
redirect_to account_connected_accounts_path
end

private
Expand Down
5 changes: 3 additions & 2 deletions app/controllers/users/totp_setup_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def confirm
def disable
process_successful_disable if MfaPolicy.new(current_user).multiple_factors_enabled?

redirect_to account_url
redirect_to account_two_factor_authentication_path
end

private
Expand Down Expand Up @@ -124,7 +124,8 @@ def new_totp_secret
end

def cap_auth_app_count
redirect_to account_url if Figaro.env.max_auth_apps_per_account.to_i <= current_auth_app_count
return unless Figaro.env.max_auth_apps_per_account.to_i <= current_auth_app_count
redirect_to account_two_factor_authentication_path
end

def current_auth_app_count
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/users/webauthn_setup_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def delete
else
handle_failed_delete
end
redirect_to account_url
redirect_to account_two_factor_authentication_path
end

def show_delete
Expand Down Expand Up @@ -109,7 +109,7 @@ def process_invalid_webauthn(form)
render :new
else
flash[:error] = t('errors.webauthn_setup.general_error')
redirect_to account_url
redirect_to account_two_factor_authentication_path
end
end

Expand Down
4 changes: 0 additions & 4 deletions app/decorators/device_decorator.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
DeviceDecorator = Struct.new(:device) do
delegate :nice_name, :last_used_at, :id, to: :device

def device_partial
'accounts/device_item'
end

def last_sign_in_location_and_ip
I18n.t('account.index.sign_in_location_and_ip', location: last_location, ip: device.last_ip)
end
Expand Down
4 changes: 0 additions & 4 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ def title(title)
content_for(:title) { title }
end

def card_cls(cls)
content_for(:card_cls) { cls }
end

def background_cls(cls)
content_for(:background_cls) { cls }
end
Expand Down
Loading