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 aaa3c51e
authored
Apr 06, 2015
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
permfixei
1 parent
6b823228
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/beans/EventBean.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/UserBean.java
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/organisation/EventOrgView.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/EventBean.java
View file @
aaa3c51
...
...
@@ -369,11 +369,8 @@ public class EventBean implements EventBeanLocal {
}
@Override
@RolesAllowed
(
SpecialPermission
.
S_SUPERADMIN
)
public
List
<
LanEvent
>
findFutureEvents
()
{
if
(!
permbean
.
getCurrentUser
().
isSuperadmin
())
{
throw
new
EJBAccessException
(
"Must be superadmin to see all events, sorry"
);
}
return
eventFacade
.
findFutureEvents
();
}
...
...
code/moya-beans/ejbModule/fi/codecrew/moya/beans/UserBean.java
View file @
aaa3c51
...
...
@@ -95,6 +95,7 @@ import fi.codecrew.moya.utilities.PasswordFunctions;
import
fi.codecrew.moya.utilities.SearchQuery
;
import
fi.codecrew.moya.utilities.SearchResult
;
import
fi.codecrew.moya.utilities.moyamessage.MoyaEventType
;
import
scala.tools.cmd.Spec
;
@LocalBean
@Stateless
...
...
@@ -1129,11 +1130,8 @@ public class UserBean implements UserBeanLocal {
}
@Override
@RolesAllowed
(
SpecialPermission
.
S_SUPERADMIN
)
public
List
<
User
>
findSuperusers
()
{
if
(!
permbean
.
getCurrentUser
().
isSuperadmin
())
throw
new
EJBException
(
"Only superadmin can see other superadmins, sorry!"
);
return
userFacade
.
findSuperusers
();
}
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/organisation/EventOrgView.java
View file @
aaa3c51
...
...
@@ -312,6 +312,10 @@ public class EventOrgView extends GenericCDIView {
}
public
List
<
User
>
getSuperUsers
()
{
if
(!
permbean
.
getCurrentUser
().
isSuperadmin
())
return
new
ArrayList
<
User
>();
return
userBean
.
findSuperusers
();
}
...
...
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