Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
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 dfa2ee61
authored
Oct 10, 2016
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tournamentParticipateBug' into 'master'
haettiin väärät roolit See merge request !347
2 parents
28fa5fc7
98bed20c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/beans/TournamentBean.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/TournamentBean.java
View file @
dfa2ee6
...
...
@@ -55,6 +55,9 @@ public class TournamentBean implements TournamentBeanLocal {
@EJB
private
TournamentTeamMemberFacade
tournamentTeamMemberFacade
;
@EJB
private
UserBean
userBean
;
/**
* Default constructor.
*/
...
...
@@ -83,12 +86,15 @@ public class TournamentBean implements TournamentBeanLocal {
return
true
;
}
List
<
Role
>
currentUserRoles
=
userBean
.
findUsersRoles
(
permissionBean
.
getCurrentUser
());
for
(
Role
r
:
tournament
.
getOpenForRoles
())
{
if
(
permissionBean
.
getCurrentUser
().
getRoles
()
.
contains
(
r
))
{
if
(
currentUserRoles
.
contains
(
r
))
{
return
true
;
}
}
return
false
;
}
...
...
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