Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SkuciSe
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tim 2 - 2022
SkuciSe
Commits
8bc5d7bc
Commit
8bc5d7bc
authored
Sep 18, 2022
by
Bogdan Andjelkovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
security updateovi
parent
ad3b8e25
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
SkuciSe/src/main/java/com/example/SkuciSe/configuration/WebSecurityConfig.java
+1
-1
SkuciSe/src/main/java/com/example/SkuciSe/controller/AppController.java
+1
-1
No files found.
SkuciSe/src/main/java/com/example/SkuciSe/configuration/WebSecurityConfig.java
View file @
8bc5d7bc
...
@@ -41,7 +41,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter
...
@@ -41,7 +41,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter
@Override
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
authorizeRequests
()
http
.
authorizeRequests
()
.
antMatchers
(
"/profile/**"
,
"/
moji-oglasi/**"
,
"/login-zahtev/**"
,
"/lista-korisnika"
,
"/novi
-oglas/**"
).
authenticated
()
.
antMatchers
(
"/profile/**"
,
"/
login-zahtev/**"
,
"/lista-korisnika"
,
"/novi-oglas/**"
,
"/lajkuj
-oglas/**"
).
authenticated
()
.
anyRequest
().
permitAll
()
.
anyRequest
().
permitAll
()
.
and
().
formLogin
().
loginPage
(
"/login"
).
permitAll
()
.
and
().
formLogin
().
loginPage
(
"/login"
).
permitAll
()
.
usernameParameter
(
"email"
)
.
usernameParameter
(
"email"
)
...
...
SkuciSe/src/main/java/com/example/SkuciSe/controller/AppController.java
View file @
8bc5d7bc
...
@@ -85,7 +85,7 @@ public class AppController
...
@@ -85,7 +85,7 @@ public class AppController
public
String
getChat
(
Model
model
,
@AuthenticationPrincipal
KorisnikDetails
loggedUser
,
@RequestParam
(
"email"
)
String
email
)
public
String
getChat
(
Model
model
,
@AuthenticationPrincipal
KorisnikDetails
loggedUser
,
@RequestParam
(
"email"
)
String
email
)
{
{
if
(
loggedUser
==
null
)
if
(
loggedUser
==
null
)
return
"redirect:/
moji-zahtevi
"
;
return
"redirect:/
login
"
;
model
.
addAttribute
(
"loggedUser"
,
loggedUser
);
model
.
addAttribute
(
"loggedUser"
,
loggedUser
);
model
.
addAttribute
(
"sagovornik"
,
kRepo
.
findByEmail
(
email
));
model
.
addAttribute
(
"sagovornik"
,
kRepo
.
findByEmail
(
email
));
return
"chat"
;
return
"chat"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment