fix login issue for admin, correct favicons

master
Dmitry Isaenko 2023-12-31 14:43:51 +03:00
parent aede5df82d
commit 4a1e62e6f8
12 changed files with 66 additions and 71 deletions

View File

@ -11,6 +11,7 @@ import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToMany;
import jakarta.persistence.Table;
import lombok.AccessLevel;
import lombok.Data;
@ -35,7 +36,7 @@ public class User implements UserDetails{
private String password;
private String displayname;
@ManyToAny(fetch = FetchType.EAGER)
@ManyToMany(fetch = FetchType.EAGER)
private final List<UserRole> authorities;
public User(String username, String password, String displayname, List<UserRole> authorities){

View File

@ -45,7 +45,8 @@ public class SecurityConfig {
public SecurityFilterChain filterChain(HttpSecurity http, MvcRequestMatcher.Builder mvc) throws Exception {
return http
.authorizeHttpRequests(autorize -> autorize
.requestMatchers(mvc.pattern("/favicon.ico")).permitAll()
.requestMatchers(mvc.pattern("/favicon.svg")).permitAll()
.requestMatchers(mvc.pattern("/favicon.png")).permitAll()
.requestMatchers(mvc.pattern("/jquery.js")).permitAll()
.requestMatchers(mvc.pattern("/styles/**")).permitAll()
.requestMatchers(mvc.pattern("/images/*")).permitAll()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="7.3839998mm"
height="9.467mm"
viewBox="0 0 7.3839995 9.467"
version="1.1"
id="svg5"
sodipodi:docname="s_logo.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#a535aa"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="1"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="22.627417"
inkscape:cx="28.704116"
inkscape:cy="30.383494"
inkscape:window-width="3755"
inkscape:window-height="2123"
inkscape:window-x="1165"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
showguides="false"
inkscape:lockguides="true" />
<defs
id="defs2" />
<g
inkscape:label="Слой 1"
inkscape:groupmode="layer"
id="layer1">
<path
id="rect2675"
style="opacity:1;fill:#00b185;fill-opacity:1;stroke:#ffffff;stroke-width:0.818015;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="M 0.4987411,2.6910294 6.8852589,0.40803435 c 0.047902,-0.017123 0.089733,0.0438099 0.089733,0.0982098 V 8.9576038 c 0,0.0544 -0.040032,0.09821 -0.089733,0.09821 0,0 -3.2433058,-2.0452477 -3.2433058,-3.8408636 0,-0.06402 0,-0.06402 0,0 0,1.7946379 -3.143212,3.8409356 -3.143212,3.8409356 -0.0383515,0.03461 -0.0897335,-0.04381 -0.0897335,-0.09821 V 2.7892412 c 0,-0.05441 0.0897335,-0.097032 0.0897335,-0.09821 z"
sodipodi:nodetypes="sssssssssscs" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="78mm"
height="12.5mm"
viewBox="0 0 78 12.5"
version="1.1"
id="svg5"
sodipodi:docname="marinesco logo1.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#a535aa"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="1"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="5.6568543"
inkscape:cx="167.14236"
inkscape:cy="56.656931"
inkscape:window-width="3755"
inkscape:window-height="2123"
inkscape:window-x="1165"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
showguides="false"
inkscape:lockguides="true" />
<defs
id="defs2" />
<g
inkscape:label="Слой 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.340466;stroke-linejoin:round;paint-order:stroke fill markers"
id="rect15547"
width="78"
height="12.5"
x="0"
y="0"
ry="1.226432" />
<path
style="color:#000000;fill:#15bade;-inkscape-stroke:none"
d="M 27.730628,1.5763661 C 25.036825,1.5596634 22.673126,2.2437308 20.494299,3.0548817 15.52534,4.9047658 11.509661,7.3067267 4.20719,6.2443347 l -0.2382811,-0.03516 -0.2402344,0.01563 c 0,0 -0.571584,0.03161 -1.09375,0.355469 -0.522166,0.323861 -1.0854728,1.181111 -1.1308594,1.90039 -0.031147,0.493776 0.1131821,1.217964 0.5546875,1.7480473 0.4415054,0.530084 1.3378907,0.798828 1.3378907,0.798828 l 0.056641,0.01172 0.056641,0.0078 C 12.15843,12.305276 17.748772,9.2542897 22.18766,7.6017457 c 2.225096,-0.828377 4.129469,-1.332733 6.328125,-1.154297 2.198656,0.178436 4.822312,1.053458 8.382812,3.423828 l 1.878907,1.2500003 0.002,-0.0039 0.002,0.002 1.875,-1.2500003 c 3.560451,-2.370338 6.184021,-3.243543 8.382812,-3.421875 2.198792,-0.178332 4.10494,0.325904 6.330078,1.154297 4.439025,1.652595 10.029323,4.7035173 18.677735,3.4453133 l 0.05078,-0.0078 0.04883,-0.0098 c 0,0 0.902708,-0.265223 1.347656,-0.796875 0.444949,-0.5316513 0.589732,-1.2583183 0.558594,-1.7519533 -0.04553,-0.721911 -0.612608,-1.579806 -1.134765,-1.902343 -0.522158,-0.322538 -1.091797,-0.353516 -1.091797,-0.353516 l -0.240235,-0.01563 -0.238281,0.03516 C 66.045442,7.3067127 62.031754,4.904815 57.062659,3.0548817 54.883831,2.2437293 52.518178,1.5596634 49.824378,1.5763661 c -0.385437,0.00239 -0.775891,0.018721 -1.171875,0.050781 -2.945866,0.2385075 -6.201654,1.4666842 -9.875,3.7734376 -3.672889,-2.3061606 -6.92781,-3.5330278 -9.873047,-3.7714845 -0.396002,-0.032061 -0.788428,-0.050345 -1.173828,-0.052734 z"
id="path1154" />
<path
id="rect2675"
style="opacity:1;fill:#00b185;fill-opacity:1;stroke:#ffffff;stroke-width:0.818;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="M 40.69873,4.1910257 47.085,1.9080267 c 0.0479,-0.017123 0.08973,0.04381 0.08973,0.09821 v 8.4513743 c 0,0.0544 -0.04003,0.09821 -0.08973,0.09821 0,0 -3.24318,-2.0452513 -3.24318,-3.8408703 0,-0.06402 0,-0.06402 0,0 0,1.794641 -3.14309,3.8409423 -3.14309,3.8409423 -0.03835,0.03461 -0.08973,-0.04381 -0.08973,-0.09821 V 4.2892377 c 0,-0.05441 0.08973,-0.097032 0.08973,-0.09821 z"
sodipodi:nodetypes="sssssssssscs" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -3,7 +3,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="alternate icon" href="/favicon.png" type="image/png">
<link rel="stylesheet" th:href="@{/styles/styles.css}" />
<title th:text="${code}">title</title>
</head>

View File

@ -3,7 +3,8 @@
<head>
<title>Marinesco</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="alternate icon" href="/favicon.png" type="image/png">
<link rel="stylesheet" th:href="@{/styles/styles.css}" />
</head>

View File

@ -3,7 +3,8 @@
<head>
<title>Marinesco - Manage users</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="alternate icon" href="/favicon.png" type="image/png">
<link rel="stylesheet" th:href="@{/styles/styles.css}" />
</head>

View File

@ -3,7 +3,8 @@
<head>
<title>Marinesco - registration form</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="alternate icon" href="/favicon.png" type="image/png">
<link rel="stylesheet" th:href="@{/styles/styles.css}" />
<script src="/jquery.js"></script>
</head>

View File

@ -3,7 +3,8 @@
<head>
<title>Marinesco</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="alternate icon" href="/favicon.png" type="image/png">
<link rel="stylesheet" th:href="@{/styles/styles.css}" />
</head>
@ -11,7 +12,6 @@
<div class="page">
<div th:replace="~{fragments/header :: 'header'}"></div>
<div class="container base">
<img th:src="@{/images/logo.svg}" />
<br /><a href="/login">Login</a>
<br /><a href="/profile">/profile</a>
<br /><a href="/manage_users">/manage_users</a>

View File

@ -3,7 +3,8 @@
<head>
<title>Marinesco - Profile settings</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="alternate icon" href="/favicon.png" type="image/png">
<link rel="stylesheet" th:href="@{/styles/styles.css}" />
</head>