[JBoss Seam] - Re: Securing components
by rapowder
Something else: if I call the method addRole() after id.authenticate() the role is actually added, but when I load the pages where I actually want to check if the user is ADMIN (see first post when i call delete()) the method still returns false.
Some additional info: I declared the authenticator method in components.xml as follows:
<security:identity authenticate-method="#{login.authenticate}"/>
and pages.xml looks like follows:
| <pages login-view-id="/auth_login.xhtml">
| ...
| <page view-id="/mypage.xhtml" no-conversation-view-id="/auth_login.xhtml" login-required="true">
| ...
| </page>
| ...
| </pages>
|
I noticed that if I don't call the authenticate() method manually from the login page (see first post) it is never called and any page that I try to render redirects me to the login page. Shouldn't the authenticate method be called automatically?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059835#4059835
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059835
18Â years, 9Â months
[JBoss Seam] - Re: Workspace switcher
by g00se24
Here we go:
| <rich:modalPanel xmlns:h="http://java.sun.com/jsf/html"
|
| xmlns:f="http://java.sun.com/jsf/core"
|
| xmlns:s="http://jboss.com/products/seam/taglib"
|
| xmlns:rich="http://richfaces.ajax4jsf.org/rich"
|
| id="workspaces" minHeight="200" minWidth="450" height="200" width="500">
|
| <f:facet name="header">
|
| <h:outputText value="Workspaces" />
|
| </f:facet>
|
| <f:facet name="controls">
|
| <h:graphicImage value="/resource/close.png" style="cursor:pointer" onclick="Richfaces.hideModalPanel('workspaces')" />
|
| </f:facet>
|
| <h:form>
|
| <h:dataTable value="#{conversationList}" var="item" rendered="#{not empty conversationList}">
|
| <h:column>
|
| <h:outputText value="#{item.startDatetime}">
|
| <s:convertDateTime pattern="hh:mm - dd.MM.yy" />
|
| </h:outputText>
|
| -
|
| <h:outputText value="#{item.lastDatetime}">
|
| <s:convertDateTime pattern="hh:mm - dd.MM.yy" />
|
| </h:outputText>
|
| </h:column>
|
| <h:column>
|
| <h:commandLink value="#{item.description}" action="#{item.select}" />
|
| </h:column>
|
| <h:column>
|
| <h:outputText value="current" rendered="#{item.current}" />
|
| </h:column>
|
| <h:column>
|
| <h:commandLink value="Select" action="#{item.select}" />
|
| </h:column>
|
| <h:column>
|
| <h:commandLink value="Destroy" action="#{item.destroy}" />
|
| </h:column>
|
| </h:dataTable>
|
| </h:form>
|
| </rich:modalPanel>
|
These part of my site is always included into the menubar!
So, if I'm in a conversation (example editing a user or something else) you can destroy these conversation, but I'm still on the same site (looks to the user like nothing have changed). The user doesn't see that the backing components are destroyed and so believes he could go on. The nice thing is that their are no exceptions thrown by seam in this case. ;)
Preferred solution:
I would like now to user a navigation rule to move after destroy method is called to the main page, but only if I destroyed the current conversation.
Have you any idea?
Another workaround would be to disable the destroy link for the current conversation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059832#4059832
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059832
18Â years, 9Â months