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 66344b41
authored
Mar 21, 2010
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some nice examble
1 parent
d8809b16
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
code/LanBortalWeb/WebContent/resources/tools/user/list.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/handler/SessionHandler.java
code/LanBortalWeb/WebContent/resources/tools/user/list.xhtml
View file @
66344b4
...
@@ -17,8 +17,9 @@
...
@@ -17,8 +17,9 @@
<composite:implementation>
<composite:implementation>
<h:form>
<h:form>
<c:choose>
<c:when
test=
'#{sessionHandler.hasPermission("userList", "read") }'
>
<h:dataTable
border=
"1"
id=
"user"
value=
"#{userView.users}"
var=
"user"
>
<h:dataTable
border=
"1"
id=
"user"
value=
"#{userView.users}"
var=
"user"
>
<h:column>
<h:column>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
...
@@ -69,10 +70,20 @@
...
@@ -69,10 +70,20 @@
<h:commandButton
action=
"#{userView.edit()}"
value=
"Edit"
/>
<h:commandButton
action=
"#{userView.edit()}"
value=
"Edit"
/>
</h:column>
</h:column>
</h:dataTable>
</h:dataTable>
</c:when>
<c:otherwise>
TODO: some nice message to user.
</c:otherwise>
</c:choose>
</h:form>
</h:form>
</composite:implementation>
</composite:implementation>
</html>
</html>
code/LanBortalWeb/src/fi/insomnia/bortal/handler/SessionHandler.java
View file @
66344b4
...
@@ -18,7 +18,7 @@ import fi.insomnia.bortal.model.User;
...
@@ -18,7 +18,7 @@ import fi.insomnia.bortal.model.User;
*
*
* @author tuukka
* @author tuukka
*/
*/
@ManagedBean
(
name
=
"
S
essionHandler"
)
@ManagedBean
(
name
=
"
s
essionHandler"
)
@SessionScoped
@SessionScoped
public
class
SessionHandler
{
public
class
SessionHandler
{
...
@@ -43,8 +43,8 @@ public class SessionHandler {
...
@@ -43,8 +43,8 @@ public class SessionHandler {
}
}
public
boolean
hasPermission
(
String
target
,
RolePermission
permission
)
{
public
boolean
hasPermission
(
String
target
,
RolePermission
permission
)
{
return
false
;
return
handlerbean
.
hasPermission
(
target
,
getUser
(),
permission
);
//
return handlerbean.hasPermission(target, getUser(), permission);
}
}
...
...
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