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 e9411e2f
authored
May 12, 2012
by
Juho Juopperi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
permbean
1 parent
1db08517
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
17 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/PermissionBean.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/PermissionBean.java
View file @
e9411e2
...
...
@@ -152,16 +152,16 @@ public class PermissionBean implements PermissionBeanLocal {
@Override
public
boolean
isLoggedIn
()
{
return
!
getAnonUser
().
equals
(
getCurrentUser
())
||
getCurrentUser
().
isSuperadmin
();
return
!
getAnon
Event
User
().
equals
(
getCurrentUser
())
||
getCurrentUser
().
isSuperadmin
();
}
@Override
public
EventUser
getCurrentUser
()
{
Principal
principal
=
context
.
getCallerPrincipal
();
EventUser
ret
=
userf
acade
.
findByLogin
(
principal
.
getName
());
EventUser
ret
=
eventUserF
acade
.
findByLogin
(
principal
.
getName
());
if
(
ret
==
null
)
{
ret
=
getAnonUser
();
ret
=
getAnon
Event
User
();
}
return
ret
;
}
...
...
@@ -171,20 +171,6 @@ public class PermissionBean implements PermissionBeanLocal {
* the role.
*/
@Override
public
User
getAnonUser
()
{
User
defaultUser
=
userfacade
.
findByLogin
(
User
.
ANONYMOUS_LOGINNAME
);
if
(
defaultUser
==
null
)
{
defaultUser
=
new
User
();
defaultUser
.
setLogin
(
User
.
ANONYMOUS_LOGINNAME
);
defaultUser
.
setNick
(
User
.
ANONYMOUS_LOGINNAME
);
userfacade
.
create
(
defaultUser
);
// defaultUser.setSuperadmin(true);
}
return
defaultUser
;
}
@Override
public
EventUser
getAnonEventUser
()
{
EventUser
defaultUser
=
eventUserFacade
.
findByLogin
(
User
.
ANONYMOUS_LOGINNAME
);
if
(
defaultUser
==
null
)
{
...
...
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