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 ce16315e
authored
Oct 23, 2013
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow roles to be listed if VIEW_ALL
1 parent
bcd7ee6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/RoleBean.java
code/MoyaWeb/src/fi/codecrew/moya/web/helper/LayoutView.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/RoleBean.java
View file @
ce16315
...
@@ -19,12 +19,10 @@ import javax.ejb.Stateless;
...
@@ -19,12 +19,10 @@ import javax.ejb.Stateless;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
fi.codecrew.moya.facade.RoleFacade
;
import
fi.codecrew.moya.facade.UserFacade
;
import
fi.codecrew.moya.beans.EventBeanLocal
;
import
fi.codecrew.moya.beans.RoleBeanLocal
;
import
fi.codecrew.moya.enums.apps.IAppPermission
;
import
fi.codecrew.moya.enums.apps.IAppPermission
;
import
fi.codecrew.moya.enums.apps.UserPermission
;
import
fi.codecrew.moya.enums.apps.UserPermission
;
import
fi.codecrew.moya.facade.RoleFacade
;
import
fi.codecrew.moya.facade.UserFacade
;
import
fi.codecrew.moya.model.ApplicationPermission
;
import
fi.codecrew.moya.model.ApplicationPermission
;
import
fi.codecrew.moya.model.EventUser
;
import
fi.codecrew.moya.model.EventUser
;
import
fi.codecrew.moya.model.Role
;
import
fi.codecrew.moya.model.Role
;
...
@@ -53,8 +51,9 @@ public class RoleBean implements RoleBeanLocal {
...
@@ -53,8 +51,9 @@ public class RoleBean implements RoleBeanLocal {
@EJB
@EJB
private
UserFacade
userFacade
;
private
UserFacade
userFacade
;
// VIEW_ALL pitää olla että voidaan hakea roolien perusteella.
@Override
@Override
@RolesAllowed
(
UserPermission
.
S_READ_ROLES
)
@RolesAllowed
(
{
UserPermission
.
S_READ_ROLES
,
UserPermission
.
S_VIEW_ALL
}
)
public
List
<
Role
>
listRoles
()
{
public
List
<
Role
>
listRoles
()
{
return
roleFacade
.
findAll
();
return
roleFacade
.
findAll
();
}
}
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/helper/LayoutView.java
View file @
ce16315
...
@@ -75,9 +75,9 @@ public class LayoutView {
...
@@ -75,9 +75,9 @@ public class LayoutView {
{
{
selectedSet
=
new
HashSet
<>();
selectedSet
=
new
HashSet
<>();
selectedTop
=
menubean
.
findNavigation
(
getPagepath
());
selectedTop
=
menubean
.
findNavigation
(
getPagepath
());
while
(
selectedTop
!=
null
&&
selectedTop
.
getParent
()
!=
null
)
{
while
(
selectedTop
!=
null
)
{
selectedTop
=
selectedTop
.
getParent
();
selectedSet
.
add
(
selectedTop
);
selectedSet
.
add
(
selectedTop
);
selectedTop
=
selectedTop
.
getParent
();
}
}
List
<
MenuNavigation
>
tops
=
menubean
.
getTopmenus
();
List
<
MenuNavigation
>
tops
=
menubean
.
getTopmenus
();
...
...
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