Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Max Mecklin
/
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 e970bad0
authored
Sep 18, 2013
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove release place also from database.
1 parent
734c9129
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/BootstrapBean.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/PermissionBean.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/BootstrapBean.java
View file @
e970bad
...
@@ -31,6 +31,7 @@ public class BootstrapBean implements BootstrapBeanLocal {
...
@@ -31,6 +31,7 @@ public class BootstrapBean implements BootstrapBeanLocal {
dbUpdates
.
add
(
new
String
[]
{
"ALTER TABLE tournaments ADD COLUMN rules integer NOT NULL REFERENCES tournament_rules(id)"
});
dbUpdates
.
add
(
new
String
[]
{
"ALTER TABLE tournaments ADD COLUMN rules integer NOT NULL REFERENCES tournament_rules(id)"
});
dbUpdates
.
add
(
new
String
[]
{
"ALTER TABLE tournaments ADD COLUMN max_participants integer NOT NULL DEFAULT 0"
});
dbUpdates
.
add
(
new
String
[]
{
"ALTER TABLE tournaments ADD COLUMN max_participants integer NOT NULL DEFAULT 0"
});
dbUpdates
.
add
(
new
String
[]
{
"ALTER TABLE tournament_participants ADD COLUMN tournament integer NOT NULL REFERENCES tournaments(id)"
});
dbUpdates
.
add
(
new
String
[]
{
"ALTER TABLE tournament_participants ADD COLUMN tournament integer NOT NULL REFERENCES tournaments(id)"
});
dbUpdates
.
add
(
new
String
[]
{
"DELETE FROM application_permissions WHERE application = 'MAP' and permission = 'RELEASE_PLACE'"
});
// dbUpdates.add(new String[] { "ALTER TABLE users ALTER COLUMN birthday TYPE date" });
// dbUpdates.add(new String[] { "ALTER TABLE users ALTER COLUMN birthday TYPE date" });
}
}
...
...
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/PermissionBean.java
View file @
e970bad
...
@@ -17,8 +17,8 @@ import fi.codecrew.moya.enums.apps.BillPermission;
...
@@ -17,8 +17,8 @@ import fi.codecrew.moya.enums.apps.BillPermission;
import
fi.codecrew.moya.enums.apps.CompoPermission
;
import
fi.codecrew.moya.enums.apps.CompoPermission
;
import
fi.codecrew.moya.enums.apps.ContentPermission
;
import
fi.codecrew.moya.enums.apps.ContentPermission
;
import
fi.codecrew.moya.enums.apps.EventPermission
;
import
fi.codecrew.moya.enums.apps.EventPermission
;
import
fi.codecrew.moya.enums.apps.LicensePermission
;
import
fi.codecrew.moya.enums.apps.IAppPermission
;
import
fi.codecrew.moya.enums.apps.IAppPermission
;
import
fi.codecrew.moya.enums.apps.LicensePermission
;
import
fi.codecrew.moya.enums.apps.MapPermission
;
import
fi.codecrew.moya.enums.apps.MapPermission
;
import
fi.codecrew.moya.enums.apps.PollPermission
;
import
fi.codecrew.moya.enums.apps.PollPermission
;
import
fi.codecrew.moya.enums.apps.ShopPermission
;
import
fi.codecrew.moya.enums.apps.ShopPermission
;
...
@@ -53,7 +53,7 @@ import fi.codecrew.moya.model.User;
...
@@ -53,7 +53,7 @@ import fi.codecrew.moya.model.User;
MapPermission
.
S_MANAGE_MAPS
,
MapPermission
.
S_MANAGE_MAPS
,
MapPermission
.
S_MANAGE_OTHERS
,
MapPermission
.
S_MANAGE_OTHERS
,
MapPermission
.
S_BUY_PLACES
,
MapPermission
.
S_BUY_PLACES
,
MapPermission
.
S_RELEASE_PLACE
,
//
MapPermission.S_RELEASE_PLACE,
ShopPermission
.
S_LIST_ALL_PRODUCTS
,
ShopPermission
.
S_LIST_ALL_PRODUCTS
,
ShopPermission
.
S_LIST_USERPRODUCTS
,
ShopPermission
.
S_LIST_USERPRODUCTS
,
...
@@ -92,7 +92,7 @@ import fi.codecrew.moya.model.User;
...
@@ -92,7 +92,7 @@ import fi.codecrew.moya.model.User;
EventPermission
.
S_MANAGE_PRIVATE_PROPERTIES
,
EventPermission
.
S_MANAGE_PRIVATE_PROPERTIES
,
EventPermission
.
S_MANAGE_PROPERTIES
,
EventPermission
.
S_MANAGE_PROPERTIES
,
LicensePermission
.
S_MANAGE
,
LicensePermission
.
S_MANAGE
,
LicensePermission
.
S_VIEW_OWN_CODES
LicensePermission
.
S_VIEW_OWN_CODES
})
})
...
@@ -116,7 +116,6 @@ public class PermissionBean implements PermissionBeanLocal {
...
@@ -116,7 +116,6 @@ public class PermissionBean implements PermissionBeanLocal {
@EJB
@EJB
private
EventBeanLocal
eventbean
;
private
EventBeanLocal
eventbean
;
@Override
@Override
public
boolean
hasPermission
(
IAppPermission
perm
)
{
public
boolean
hasPermission
(
IAppPermission
perm
)
{
...
@@ -128,8 +127,6 @@ public class PermissionBean implements PermissionBeanLocal {
...
@@ -128,8 +127,6 @@ public class PermissionBean implements PermissionBeanLocal {
}
}
@Override
@Override
public
boolean
isCurrentUser
(
User
user
)
{
public
boolean
isCurrentUser
(
User
user
)
{
return
(
context
.
getCallerPrincipal
()
==
null
||
user
==
null
)
?
false
:
context
.
getCallerPrincipal
().
getName
().
equals
(
user
.
getLogin
());
return
(
context
.
getCallerPrincipal
()
==
null
||
user
==
null
)
?
false
:
context
.
getCallerPrincipal
().
getName
().
equals
(
user
.
getLogin
());
...
@@ -161,8 +158,7 @@ public class PermissionBean implements PermissionBeanLocal {
...
@@ -161,8 +158,7 @@ public class PermissionBean implements PermissionBeanLocal {
}
}
/**
/**
* Makes sure default user and public role exist and the user is member of
* Makes sure default user and public role exist and the user is member of the role.
* the role.
*/
*/
@Override
@Override
public
EventUser
getAnonEventUser
()
{
public
EventUser
getAnonEventUser
()
{
...
...
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