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 a49cf635
authored
May 13, 2012
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Loop de loop fix
1 parent
2b75e123
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/PermissionBean.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/PermissionBean.java
View file @
a49cf63
...
@@ -98,10 +98,13 @@ public class PermissionBean implements PermissionBeanLocal {
...
@@ -98,10 +98,13 @@ public class PermissionBean implements PermissionBeanLocal {
@EJB
@EJB
private
UserFacade
userfacade
;
private
UserFacade
userfacade
;
@EJB
@EJB
private
EventUserFacade
eventUserFacade
;
private
EventUserFacade
eventUserFacade
;
@EJB
private
EventBeanLocal
eventbean
;
//
//
// @Override
// @Override
// public boolean hasPermission(String perm) {
// public boolean hasPermission(String perm) {
...
@@ -180,15 +183,17 @@ public class PermissionBean implements PermissionBeanLocal {
...
@@ -180,15 +183,17 @@ public class PermissionBean implements PermissionBeanLocal {
public
EventUser
getAnonEventUser
()
{
public
EventUser
getAnonEventUser
()
{
EventUser
defaultUser
=
eventUserFacade
.
findByLogin
(
User
.
ANONYMOUS_LOGINNAME
);
EventUser
defaultUser
=
eventUserFacade
.
findByLogin
(
User
.
ANONYMOUS_LOGINNAME
);
if
(
defaultUser
==
null
)
{
if
(
defaultUser
==
null
)
{
defaultUser
=
new
EventUser
();
defaultUser
=
new
EventUser
(
new
User
(),
eventbean
.
getCurrentEvent
());
defaultUser
.
setLogin
(
User
.
ANONYMOUS_LOGINNAME
);
defaultUser
.
setLogin
(
User
.
ANONYMOUS_LOGINNAME
);
defaultUser
.
setNick
(
User
.
ANONYMOUS_LOGINNAME
);
defaultUser
.
setNick
(
User
.
ANONYMOUS_LOGINNAME
);
eventUserFacade
.
create
(
defaultUser
);
eventUserFacade
.
create
(
defaultUser
);
eventUserFacade
.
flush
();
}
}
return
defaultUser
;
return
defaultUser
;
}
}
public
String
getPrincipal
()
{
public
String
getPrincipal
()
{
Principal
principal
=
context
.
getCallerPrincipal
();
Principal
principal
=
context
.
getCallerPrincipal
();
...
...
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