[jboss-user] [JBoss Seam] - Re: Multiple Domain Quesiton

petemuir do-not-reply at jboss.com
Fri Apr 6 15:28:38 EDT 2007


Using the Seam security to restrict access to admin dependent on domain is probably overkill.  You could easily do it with a page action

<page view-id="/admin/*" action="#{pageController.restrictAdminAccess}" />

@Name("pageController")
  | public class PageController {
  | 
  |    @In String hostname;
  | 
  |    public String restrictAdminAccess() {
  |       if (ALLOWED_HOSTNAME.equals(hostname)) {
  |          return null;
  |       } else {
  |           return "/error.xhtml";
  |       }
  |    }
  | }

Where error.xhtml would be a page with a message telling the user that page isn't accessible (of course you could send a 404 at this point using FacesContext

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035443#4035443

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035443



More information about the jboss-user mailing list