Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
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 139d54b3
authored
Oct 06, 2012
by
Tuukka Kivilahti, TKffTK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
can haz
1 parent
42a59ade
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
10 deletions
code/LanBortalWeb/WebContent/layout/insomnia1/sidebar-frontpage.xhtml
code/LanBortalWeb/WebContent/layout/stream1/sidebar-frontpage.xhtml
code/LanBortalWeb/WebContent/permissionDenied.xhtml
code/LanBortalWeb/WebContent/resources/cditools/bills/list.xhtml
code/LanBortalWeb/WebContent/useradmin/edit.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/user/RoleView.java
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/user/UserView.java
code/LanBortalWeb/WebContent/layout/insomnia1/sidebar-frontpage.xhtml
View file @
139d54b
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
>
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
>
<h:body>
<h:body>
<ui:composition
template=
"/layout/insomnia1/sidebartemplate.xhtml"
>
<ui:composition
template=
"/layout/insomnia1/sidebartemplate.xhtml"
>
<ui:param
name=
"rendered"
value=
"#{!sessionHandler.
isLoggedIn()
}"
/>
<ui:param
name=
"rendered"
value=
"#{!sessionHandler.
loggedIn
}"
/>
<ui:define
name=
"sidebarcontent"
>
<ui:define
name=
"sidebarcontent"
>
<ul>
<ul>
<li><h:link
outcome=
"/user/create.xhtml"
value=
"#{i18n['sidebar.createuser']}"
/></li>
<li><h:link
outcome=
"/user/create.xhtml"
value=
"#{i18n['sidebar.createuser']}"
/></li>
...
...
code/LanBortalWeb/WebContent/layout/stream1/sidebar-frontpage.xhtml
View file @
139d54b
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
>
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
>
<h:body>
<h:body>
<ui:composition
template=
"sidebartemplate.xhtml"
>
<ui:composition
template=
"sidebartemplate.xhtml"
>
<ui:param
name=
"rendered"
value=
"#{!sessionHandler.
isLoggedIn()
}"
/>
<ui:param
name=
"rendered"
value=
"#{!sessionHandler.
loggedIn
}"
/>
<ui:define
name=
"sidebarcontent"
>
<ui:define
name=
"sidebarcontent"
>
<ul>
<ul>
<li><h:link
outcome=
"/user/create.xhtml"
value=
"#{i18n['sidebar.createuser']}"
/></li>
<li><h:link
outcome=
"/user/create.xhtml"
value=
"#{i18n['sidebar.createuser']}"
/></li>
...
...
code/LanBortalWeb/WebContent/permissionDenied.xhtml
View file @
139d54b
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
<ui:define
name=
"content"
>
<ui:define
name=
"content"
>
<h1>
#{i18n['permissiondenied.header']}
</h1>
<h1>
#{i18n['permissiondenied.header']}
</h1>
<p>
<p>
<h:outputText
rendered=
"#{!sessionHandler.
isLoggedIn()
}"
value=
"#{i18n['permissiondenied.notLoggedIn']}"
/>
<h:outputText
rendered=
"#{!sessionHandler.
loggedIn
}"
value=
"#{i18n['permissiondenied.notLoggedIn']}"
/>
<h:outputText
rendered=
"#{sessionHandler.
isLoggedIn()
}"
value=
"#{i18n['permissiondenied.alreadyLoggedIn']}"
/>
<h:outputText
rendered=
"#{sessionHandler.
loggedIn
}"
value=
"#{i18n['permissiondenied.alreadyLoggedIn']}"
/>
</p>
</p>
</ui:define>
</ui:define>
</ui:composition>
</ui:composition>
...
...
code/LanBortalWeb/WebContent/resources/cditools/bills/list.xhtml
View file @
139d54b
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<h:link
rendered=
"#{billListView.canWriteBill()}"
outcome=
"/useradmin/edit"
value=
"#{bill.addr1}"
>
<h:link
rendered=
"#{billListView.canWriteBill()}"
outcome=
"/useradmin/edit"
value=
"#{bill.addr1}"
>
<f:param
name=
"userid"
value=
"#{bill.user.user.id}"
/>
<f:param
name=
"userid"
value=
"#{bill.user.user.id}"
/>
</h:link>
</h:link>
<h:outputText
rendered=
"#{!billListView.canWriteBill
()
}"
value=
"#{bill.addr1}"
/>
<h:outputText
rendered=
"#{!billListView.canWriteBill}"
value=
"#{bill.addr1}"
/>
</h:column>
</h:column>
<h:column>
<h:column>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
...
...
code/LanBortalWeb/WebContent/useradmin/edit.xhtml
View file @
139d54b
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<h2>
<h2>
<h:outputText
value=
"#{i18n['user.roles']}:"
/>
<h:outputText
value=
"#{i18n['user.roles']}:"
/>
</h2>
</h2>
<h:selectManyCheckbox
converter=
"#{roleConverter}"
disabled=
"#{!roleView.canWriteRoles
()
}"
layout=
"pageDirection"
id=
"roles"
value=
"#{userView.usersRoles}"
>
<h:selectManyCheckbox
converter=
"#{roleConverter}"
disabled=
"#{!roleView.canWriteRoles}"
layout=
"pageDirection"
id=
"roles"
value=
"#{userView.usersRoles}"
>
<f:selectItems
var=
"roleitem"
itemLabel=
"#{roleitem.name}"
value=
"#{roleDataView.roles}"
/>
<f:selectItems
var=
"roleitem"
itemLabel=
"#{roleitem.name}"
value=
"#{roleDataView.roles}"
/>
</h:selectManyCheckbox>
</h:selectManyCheckbox>
<div>
<div>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/user/RoleView.java
View file @
139d54b
...
@@ -59,11 +59,11 @@ public class RoleView extends GenericCDIView {
...
@@ -59,11 +59,11 @@ public class RoleView extends GenericCDIView {
}
}
}
}
public
boolean
c
anReadRoles
()
{
public
boolean
isC
anReadRoles
()
{
return
permbean
.
hasPermission
(
UserPermission
.
READ_ROLES
);
return
permbean
.
hasPermission
(
UserPermission
.
READ_ROLES
);
}
}
public
boolean
c
anWriteRoles
()
{
public
boolean
isC
anWriteRoles
()
{
return
permbean
.
hasPermission
(
UserPermission
.
WRITE_ROLES
);
return
permbean
.
hasPermission
(
UserPermission
.
WRITE_ROLES
);
}
}
...
@@ -117,7 +117,7 @@ public class RoleView extends GenericCDIView {
...
@@ -117,7 +117,7 @@ public class RoleView extends GenericCDIView {
}
}
public
String
savePermissions
()
{
public
String
savePermissions
()
{
if
(
c
anWriteRoles
())
{
if
(
isC
anWriteRoles
())
{
ArrayList
<
IAppPermission
>
newPerms
=
new
ArrayList
<
IAppPermission
>();
ArrayList
<
IAppPermission
>
newPerms
=
new
ArrayList
<
IAppPermission
>();
for
(
BortalApplicationWrapper
appWrap
:
rolePermissions
)
{
for
(
BortalApplicationWrapper
appWrap
:
rolePermissions
)
{
for
(
IAppPermission
apWrap
:
appWrap
.
getPermissions
())
{
for
(
IAppPermission
apWrap
:
appWrap
.
getPermissions
())
{
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/user/UserView.java
View file @
139d54b
...
@@ -101,10 +101,11 @@ public class UserView extends GenericCDIView {
...
@@ -101,10 +101,11 @@ public class UserView extends GenericCDIView {
return
user
;
return
user
;
}
}
public
void
saveRoles
()
public
String
saveRoles
()
{
{
rolebean
.
saveRoles
(
user
,
usersRoles
);
rolebean
.
saveRoles
(
user
,
usersRoles
);
usersRoles
=
null
;
usersRoles
=
null
;
return
null
;
}
}
public
List
<
Role
>
getUsersRoles
()
{
public
List
<
Role
>
getUsersRoles
()
{
...
...
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