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 a441fb90
authored
Apr 07, 2015
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix orgrole creation
1 parent
b10e766e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/user/OrgRoleView.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
View file @
a441fb9
...
...
@@ -232,6 +232,7 @@ public class MenuBean implements MenuBeanLocal {
adminroles
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/role/edit"
),
null
).
setVisible
(
false
);
adminroles
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/orgrole/list"
),
UserPermission
.
READ_ORGROLES
);
adminroles
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/orgrole/create"
),
UserPermission
.
WRITE_ORGROLES
);
adminroles
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/orgrole/edit"
),
null
).
setVisible
(
false
);
MenuNavigation
adminEventCards
=
adminuser
.
addPage
(
null
,
null
);
adminEventCards
.
setKey
(
"subnavi.cards"
);
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/user/OrgRoleView.java
View file @
a441fb9
...
...
@@ -82,16 +82,16 @@ public class OrgRoleView extends GenericCDIView {
}
public
void
initForCreate
()
{
if
(
requirePermissions
(
permbean
.
hasPermission
(
UserPermission
.
WRITE_ORGROLES
)))
{
if
(
requirePermissions
(
permbean
.
hasPermission
(
UserPermission
.
WRITE_ORGROLES
))
&&
orgRole
==
null
)
{
OrgRole
role
=
new
OrgRole
();
role
.
setEventOrganisation
(
eventBean
.
getCurrentEvent
().
getOrganiser
());
setOrgRole
(
role
)
;
orgRole
=
role
;
super
.
beginConversation
();
}
}
public
void
initForEdit
()
{
if
(
requirePermissions
(
permbean
.
hasPermission
(
UserPermission
.
WRITE_ORGROLES
)))
{
if
(
requirePermissions
(
permbean
.
hasPermission
(
UserPermission
.
WRITE_ORGROLES
))
&&
orgRole
==
null
)
{
orgRole
=
orgRoleBean
.
find
(
id
);
super
.
beginConversation
();
}
...
...
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