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 0ad14370
authored
Apr 14, 2014
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Permission and nullpointer fixes
1 parent
2b2d50ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/EventBean.java
code/MoyaWeb/src/fi/codecrew/moya/servlet/PlaceMap.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/EventBean.java
View file @
0ad1437
...
...
@@ -138,7 +138,7 @@ public class EventBean implements EventBeanLocal {
@Override
@RolesAllowed
({
SpecialPermission
.
S_SUPERADMIN
,
EventPermission
.
S_MANAGE_EVENT
})
public
LanEvent
mergeChanges
(
LanEvent
event
)
{
if
(!
permbean
.
hasPermission
(
SpecialPermission
.
SUPERADMIN
)
&&
getCurrentEvent
().
equals
(
event
))
{
if
(!
permbean
.
hasPermission
(
SpecialPermission
.
SUPERADMIN
)
&&
!
getCurrentEvent
().
equals
(
event
))
{
throw
new
EJBAccessException
(
"Trying to save another event."
);
}
return
eventFacade
.
merge
(
event
);
...
...
@@ -187,8 +187,7 @@ public class EventBean implements EventBeanLocal {
public
LanEventProperty
getProperty
(
LanEventPropertyKey
property
)
{
return
eventPropertyFacade
.
find
(
getCurrentEvent
(),
property
);
}
@Override
public
long
getPropertyLong
(
LanEventPropertyKey
property
)
{
...
...
@@ -201,8 +200,6 @@ public class EventBean implements EventBeanLocal {
}
return
ret
;
}
@Override
public
String
getPropertyString
(
LanEventPropertyKey
property
)
...
...
code/MoyaWeb/src/fi/codecrew/moya/servlet/PlaceMap.java
View file @
0ad1437
...
...
@@ -265,7 +265,7 @@ public class PlaceMap extends HttpServlet {
color
=
RESERVED_COLOR
;
// logger.debug("Setting place Reserved {}", p);
}
else
if
(
p
.
getProduct
().
getColor
()
!=
null
&&
!
p
.
getProduct
().
getColor
().
isEmpty
())
{
}
else
if
(
p
.
getProduct
()
!=
null
&&
p
.
getProduct
()
!=
null
&&
p
.
getProduct
()
.
getColor
()
!=
null
&&
!
p
.
getProduct
().
getColor
().
isEmpty
())
{
try
{
color
=
Color
.
decode
(
p
.
getProduct
().
getColor
());
...
...
@@ -273,8 +273,8 @@ public class PlaceMap extends HttpServlet {
logger
.
error
(
"Cannot convert string {} to color."
,
p
.
getProduct
().
getColor
());
}
}
else
{
// too much debugging -TKjne
// logger.debug("Nothing special for this place. Color should be default.");
// too much debugging -TKjne
// logger.debug("Nothing special for this place. Color should be default.");
}
...
...
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