Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Linnea Samila
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 53a1a870
authored
Jul 29, 2015
by
Juho Juopperi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check that the looked up code is of right event
1 parent
cd9804cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/beans/UserBean.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/UserBean.java
View file @
53a1a87
...
@@ -1140,7 +1140,16 @@ public class UserBean implements UserBeanLocal {
...
@@ -1140,7 +1140,16 @@ public class UserBean implements UserBeanLocal {
@Override
@Override
public
EventUser
findUserByCodeToken
(
String
code
)
{
public
EventUser
findUserByCodeToken
(
String
code
)
{
return
eventUserFacade
.
findByTokenCode
(
code
);
EventUser
eventUser
=
eventUserFacade
.
findByTokenCode
(
code
);
// Event mismatch?
Integer
eventId
=
eventUser
.
getEvent
().
getId
();
Integer
currentEventId
=
eventBean
.
getCurrentEvent
().
getId
();
if
(
eventId
!=
currentEventId
)
{
throw
new
IllegalStateException
(
"Looked up code "
+
code
+
" and got EventUser "
+
eventUser
.
getId
()
+
" from event "
+
eventId
+
" which is not the current event "
+
currentEventId
);
}
return
eventUser
;
}
}
@PermitAll
@PermitAll
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment