Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 98bed20c
authored
Oct 10, 2016
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
haettiin väärät roolit
1 parent
28fa5fc7
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 @
98bed20
...
...
@@ -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