@Test public void testHasRole() throws Exception { assertTrue(user.hasRole("test/role1")); assertFalse(user.hasRole("test/role3")); }
public boolean hasRole(String role) { for (String r : _roles) { if (r.equalsIgnoreCase(role)) { return true; } } return false; }
User implements Serializable { public boolean hasRole(String role) { for (String r : _roles) { if (r.equalsIgnoreCase(role)) { return true; } } return false; } }
User implements Serializable { public boolean hasRole(String role) { for (String r : _roles) { if (r.equalsIgnoreCase(role)) { return true; } } return false; } User(String name, String[] roles, String token);  User(String name, String[] roles, String token, boolean isWorkFlowAdmin); }
User implements Serializable { public boolean hasRole(String role) { for (String r : _roles) { if (r.equalsIgnoreCase(role)) { return true; } } return false; } User(String name, String[] roles, String token);  User(String name, String[] roles, String token, boolean isWorkFlowAdmin); String getName(); String[] getRoles(); String getToken(); boolean hasRole(String role); boolean isWorkFlowAdmin(); boolean hasOneRoleOf(String[] roles); }
User implements Serializable { public boolean hasRole(String role) { for (String r : _roles) { if (r.equalsIgnoreCase(role)) { return true; } } return false; } User(String name, String[] roles, String token);  User(String name, String[] roles, String token, boolean isWorkFlowAdmin); String getName(); String[] getRoles(); String getToken(); boolean hasRole(String role); boolean isWorkFlowAdmin(); boolean hasOneRoleOf(String[] roles);  }