From 4a1e62e6f8faada50f6a3bdedd9722509cb3b1a9 Mon Sep 17 00:00:00 2001 From: Dmitry Isaenko Date: Sun, 31 Dec 2023 14:43:51 +0300 Subject: [PATCH] fix login issue for admin, correct favicons --- src/main/java/ru/redrise/marinesco/User.java | 3 +- .../marinesco/security/SecurityConfig.java | 3 +- src/main/resources/static/favicon.ico | Bin 3270 -> 0 bytes src/main/resources/static/favicon.png | Bin 0 -> 2643 bytes src/main/resources/static/favicon.svg | 50 ++++++++++++++ src/main/resources/static/images/logo.svg | 62 ------------------ src/main/resources/templates/error.html | 3 +- src/main/resources/templates/login.html | 3 +- .../resources/templates/manage_users.html | 3 +- .../resources/templates/registration.html | 3 +- src/main/resources/templates/root.html | 4 +- .../resources/templates/user_settings.html | 3 +- 12 files changed, 66 insertions(+), 71 deletions(-) delete mode 100644 src/main/resources/static/favicon.ico create mode 100644 src/main/resources/static/favicon.png create mode 100644 src/main/resources/static/favicon.svg delete mode 100644 src/main/resources/static/images/logo.svg diff --git a/src/main/java/ru/redrise/marinesco/User.java b/src/main/java/ru/redrise/marinesco/User.java index bc95d06..e61966b 100644 --- a/src/main/java/ru/redrise/marinesco/User.java +++ b/src/main/java/ru/redrise/marinesco/User.java @@ -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 authorities; public User(String username, String password, String displayname, List authorities){ diff --git a/src/main/java/ru/redrise/marinesco/security/SecurityConfig.java b/src/main/java/ru/redrise/marinesco/security/SecurityConfig.java index da114d4..68f2f8e 100644 --- a/src/main/java/ru/redrise/marinesco/security/SecurityConfig.java +++ b/src/main/java/ru/redrise/marinesco/security/SecurityConfig.java @@ -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() diff --git a/src/main/resources/static/favicon.ico b/src/main/resources/static/favicon.ico deleted file mode 100644 index 48975f42b24392f2c036748e952d34d9acf58e18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3270 zcmeH|eOOav7{>2;#IGpn!;h$}l@(H1nU$6lWl&fLpp`+1+|x957#IotaJ z68Z!Ng04f5<_nAj5I~|7W|H{4yRjk-Sjj6Lkdfpzmyi#Dd6+4{LS~MNFn2)kaf10?`@%G#>>;ra#tZ@i{5QV@OiU2VmVU zDPpswR2z@=yCxt$XB^_PCn4^q$=H}X5z3q(sCG}mhMZvXAev95d=L`%gd!m~4C?$~ zY|0BoQhq2jdqc>lLsJlfGz!sdOmp)H7@I1=CfJO?SH&4rOjDGJATMG@Fq zJRjS15!ikp3P0$g@Z-USNYyRDj*>-4JGhK|F|tadka=V&vVW10y2E`{Bc`^=FZb3=aRvfPS9wn8jI8vR0(&}yG+i~<%I?8HO zNf{`w%|dz29-OEvL`8ibDjG=j`$$FjyM5*zNHR^)-y1iuYs}cELz(C zKx=y=&UZAU&7?Lw?3b+?mD=r(tdI$<_`QZ$ zHpsy)7(Z#|@+4PUo$&g!aSy}`S+?M2?%Mn3#UwecLak2vryWZD(cAx<5XAMHKzxDph*qfa1M>y;I-rk-tKv;H)`?70Z z2^}tRB6=r%S;jtlaUy!_!pN0naUVQ=nP_VfmT6_LJ}m6#h{agOl*_^cT<=kwW!iNg zK7Q3uN5dX>!!q`D^vjb+3H}tsyJZ8S!$wNH vWZ5@gM%*>{KIb#QzCVjy*Dro*s<$j-^3Uz(LeH5c*3cz)0T1N=XzRZLFiz&D diff --git a/src/main/resources/static/favicon.png b/src/main/resources/static/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..ef066be9b4e6f6db56775376da1edf6419551f29 GIT binary patch literal 2643 zcmV-Z3as^sP)EX>4Tx04R}tkv&MmKpe$iTcx5E2Rn!;W~fefsUnWG3Pq?8YK2xEOfLO`CJjl7 zi=*ILaPVWX>fqw6tAnc`2!4RLx;QDiNQwVT3N2zhIPS;0dyl(!fWJ{;s@W9>RLwHd z$%K&2tqQ?cgfNCaj3Op6Q=b#X6g)R&;^Mfxh}i>#<}RQpJ#@ROnRO;Oe_>TSngm}GF0Me;)tSZl<&{F ztZ?4qtX68Qbx;1nP+nVE<~q$0B(aDkh!7y7hB7L!5T#Wk#YCF+6CVCy$1jpgCRZ7Z z91EyIh2;3b|KNAGW??GkCWR6}_ls?Rj03@4pjo%=?_=9;o&bSo;7V)zs|{fGlk|F9 ziyQ$1+rY(jTa)*I%N=0oNtX=CkpeXRg#z$?M&FbJ25*7hHMh6cK29Hi40V;d0S*p< zi6UjMd%U}+v$ucGwEFu2=aq8R-6yh{00006VoOIv0RI600RN!9r;`8x010qNS#tmY z4c7nw4c7reD4Tcy000McNliru=L{bU9wG;8x`+S(2vA8xK~#9!?VW2-l-C)@f6wl+ zT;$>vMZ5+SgQ7-7K!He%sisDa#uTe~$@rnInL492PV2O0I&EsFW@?&Vl8%$Mj#eAf zG@7Q-$ut@rjg4uW78T6`OolSpL1UJ?DONC|2b!0 z-UCLCl9&|SnN)QU@DNZ4+yveQUJ#KBCOe^nkgTfTR@Hx~e^sk$p~+NmA#_sJxvKg% zRlTXrt4dYlOy=4af=5-SsOm;ly`(MIk4+Za21JgkKBKDV1IhX)H?HdXkKWT=7f$&W z?QiLOdrbOoK}ZMYT0euDtAD+|j@PSBvhmCzUORt+YxT8E=-!_R-TT|CjWR%52B9nP z2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rv#RQZM%Am(bf`!TXBsC_1-Q(x^ zo~-T*vUML)AP@FTV_*J!`ouQbzNiN7yVKcJE1=ZSa46;TzGbsg zhOm45ypXTzLjpvsHOBU_j}q@`a;(TnV4R5TZfkr%}KzSnSd&@g`z@yPfQ;#!!h82FX6aqo{)&$Rc_Ol%Fpy>T z-=kpE@XLH4lWTA+)YM=nxHpORrjb(yQ@Fay%$gGm*|SBE+GP>s$Nz7 zsjAlc`=EO-p4NYTTIm};7>b6i*1+^{RgH{)Yij)Y^HudkfH_zmiU!51YSnETQKzbF zRW+Ijm8!<8>T{}Ef15m<3RwRCT|_-|`R2f2gB^a36O zhFZVpAh6!rAEE<6Nwo4X7N`W?23{4BYZ!&U{s-mih0K57&c6Tv002ovPDHLkV1gQ1 B`d9z} literal 0 HcmV?d00001 diff --git a/src/main/resources/static/favicon.svg b/src/main/resources/static/favicon.svg new file mode 100644 index 0000000..4d7e74f --- /dev/null +++ b/src/main/resources/static/favicon.svg @@ -0,0 +1,50 @@ + + + + + + + + + + diff --git a/src/main/resources/static/images/logo.svg b/src/main/resources/static/images/logo.svg deleted file mode 100644 index f6a4bcd..0000000 --- a/src/main/resources/static/images/logo.svg +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - diff --git a/src/main/resources/templates/error.html b/src/main/resources/templates/error.html index 6de9ca6..521f64b 100644 --- a/src/main/resources/templates/error.html +++ b/src/main/resources/templates/error.html @@ -3,7 +3,8 @@ - + + title diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index cb4bd3f..3a2ffae 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -3,7 +3,8 @@ Marinesco - + + diff --git a/src/main/resources/templates/manage_users.html b/src/main/resources/templates/manage_users.html index 51ffa08..f985b87 100644 --- a/src/main/resources/templates/manage_users.html +++ b/src/main/resources/templates/manage_users.html @@ -3,7 +3,8 @@ Marinesco - Manage users - + + diff --git a/src/main/resources/templates/registration.html b/src/main/resources/templates/registration.html index 7ba740d..42b8127 100644 --- a/src/main/resources/templates/registration.html +++ b/src/main/resources/templates/registration.html @@ -3,7 +3,8 @@ Marinesco - registration form - + + diff --git a/src/main/resources/templates/root.html b/src/main/resources/templates/root.html index 7378f45..c4e675e 100644 --- a/src/main/resources/templates/root.html +++ b/src/main/resources/templates/root.html @@ -3,7 +3,8 @@ Marinesco - + + @@ -11,7 +12,6 @@
-
Login
/profile
/manage_users diff --git a/src/main/resources/templates/user_settings.html b/src/main/resources/templates/user_settings.html index 850caa0..698e941 100644 --- a/src/main/resources/templates/user_settings.html +++ b/src/main/resources/templates/user_settings.html @@ -3,7 +3,8 @@ Marinesco - Profile settings - + +