title: JSF Restrict Page Access / Permissions - Error Parsing Issue
body: <p>I am trying to restrict certain pages in my web application to certain users, such as an administrator. However, I keep getting the following error:</p>
  
  <pre><code>Error Parsing: #{userSession.hasRole('ADMIN')}
  </code></pre>
  
  <p>I have tried several things but keep hitting a brick wall and was hoping someone may be able to shed some light.</p>
  
  <p>My UserSession class has the following method:</p>
  
  <pre><code>public boolean hasRole(Role role)
  {
      return roles.contains(role);
  }    
  </code></pre>
  
  <p>I am also using the following Bean and session scope:</p>
  
  <pre><code>@ManagedBean(name="userSession")
  @SessionScoped
  </code></pre>
  
  <p>Then, in my view, I am using:</p>
  
  <pre><code>&lt;p:tab rendered="#{userSession.hasRole('ADMIN')}" title="Admin"&gt;
  </code></pre>
  
  <p>My Role class:</p>
  
  <pre><code>public class Role {
  
      public enum RoleType {
          ADMIN, USER
      }
  
      private RoleType type;
  
      public setRoleType(RoleType type)
      {
          this.type = type;
      }
  
      public RoleType getRoleType(RoleType type)
      {
          return this.type;
      }
  }
  </code></pre>
  
  <p>As I am using a VM it's difficult for me to copy and paste my code onto here, but here are some screenshots of the stack trace:</p>
  
  <p><a href="http://imgur.com/a/Ld8t2" rel="nofollow">http://imgur.com/a/Ld8t2</a></p>
  
  <p>Any help is greatly appreciated.</p>