mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 21:25:39 +02:00
Improve readability
This commit is contained in:
parent
f1cbdec8e7
commit
989bb32548
8 changed files with 8 additions and 8 deletions
|
@ -14,7 +14,7 @@ module Admin
|
|||
end
|
||||
|
||||
def user_for_paper_trail
|
||||
current_admin_user ? current_admin_user.id_role_username : 'guest'
|
||||
current_admin_user ? current_admin_user.id_role_username : 'anonymous'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -33,7 +33,7 @@ module Admin
|
|||
end
|
||||
|
||||
def user_for_paper_trail
|
||||
current_admin_user ? current_admin_user.id_role_username : 'guest'
|
||||
current_admin_user ? current_admin_user.id_role_username : 'anonymous'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -107,6 +107,6 @@ class Registrant::SessionsController < Devise::SessionsController
|
|||
end
|
||||
|
||||
def user_for_paper_trail
|
||||
current_registrant_user.present? ? current_registrant_user.id_role_username : 'guest'
|
||||
current_registrant_user.present? ? current_registrant_user.id_role_username : 'anonymous'
|
||||
end
|
||||
end
|
|
@ -17,6 +17,6 @@ class RegistrantController < ApplicationController
|
|||
end
|
||||
|
||||
def user_for_paper_trail
|
||||
current_registrant_user.present? ? current_registrant_user.id_role_username : 'guest'
|
||||
current_registrant_user.present? ? current_registrant_user.id_role_username : 'anonymous'
|
||||
end
|
||||
end
|
|
@ -36,7 +36,7 @@ class Registrar
|
|||
end
|
||||
|
||||
def user_for_paper_trail
|
||||
current_registrar_user ? current_registrar_user.id_role_username : 'guest'
|
||||
current_registrar_user ? current_registrar_user.id_role_username : 'anonymous'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -180,7 +180,7 @@ class Registrar
|
|||
end
|
||||
|
||||
def user_for_paper_trail
|
||||
current_registrar_user ? current_registrar_user.id_role_username : 'guest'
|
||||
current_registrar_user ? current_registrar_user.id_role_username : 'anonymous'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class AdminAreaProtectedAreaTest < ActionDispatch::IntegrationTest
|
||||
def test_unauthenticated_user_is_asked_to_authenticate_when_navigating_to_protected_area
|
||||
def test_anonymous_user_is_asked_to_authenticate_when_navigating_to_protected_area
|
||||
visit admin_domains_url
|
||||
assert_text 'You need to sign in before continuing'
|
||||
assert_current_path new_admin_user_session_path
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class RegistrarAreaProtectedAreaTest < ActionDispatch::IntegrationTest
|
||||
def test_unauthenticated_user_is_asked_to_authenticate_when_navigating_to_protected_area
|
||||
def test_anonymous_user_is_asked_to_authenticate_when_navigating_to_protected_area
|
||||
visit registrar_domains_url
|
||||
assert_text 'You need to sign in before continuing'
|
||||
assert_current_path new_registrar_user_session_path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue