From 2f3d64b5b96052e37dae32332f6c0bcc36abfb20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=B6hm?= Date: Tue, 27 Aug 2024 10:36:09 +0200 Subject: [PATCH] Small nav updates and fixes --- app/models/user.rb | 2 +- app/views/home/index.html.erb | 8 -------- app/views/layouts/_header.html.erb | 11 +++++++---- config/routes.rb | 5 +++++ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 3adfb72..9f1b082 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -14,7 +14,7 @@ class User < ApplicationRecord # validates :email, presence: true, uniqueness: true, format: { with: URI::MailTo::EMAIL_REGEXP } validates :email, presence: true, uniqueness: true, - format: { with: /\b[A-Z0-9._%a-z\-]+@(student\.|)hs\-rm\.de\z/, message: "must be a student.hs-rm.de or hs-rm.de account" } + format: { with: /\b[A-Z0-9._%a-z\-]+@(student\.|)hs\-rm\.de\z/, message: "must be a student.hs-rm.de or hs-rm.de email" } validates :password, allow_nil: true, length: { minimum: 12 } validates :password, not_pwned: { message: "might easily be guessed" } diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 677883d..bfcc9bd 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -1,23 +1,15 @@

<%= notice %>

-

Signed as <%= Current.user.email %>

-

Login and verification

-
<%= link_to "Change password", edit_password_path %>
-
<%= link_to "Change email address", edit_identity_email_path %>
-

Access history

-
<%= link_to "Devices & Sessions", sessions_path %>
-
- <%= button_to "Log out", Current.session, method: :delete %> diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 65ad76e..53eda24 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -1,11 +1,11 @@
Plottservice Fachbereich AB - <% if user_signed_in? && current_user&.admin? || current_user&.operator? %> + <% if user_signed_in? && current_user.admin? || current_user.operator? %>