- Set<PCacheLDAPAuthority> roles = EnumSet.noneOf(PCacheLDAPAuthority.class);
- roles.add(PCacheLDAPAuthority.ROLE_LDAP_USER);
- logger.info("LDAPAuthorityMapper: set new role ROLE_LDAP_USER");
- *
- * for (GrantedAuthority authority : authorities) { if
- * (ROLE_CUSTOMER_SERVICE_OFFICER.equals(authority.getAuthority())) {
- * roles.add(PCacheLDAPAuthority.ROLE_USER); } else if
- * (ROLE_ADMIN.equals(authority.getAuthority())) {
- * roles.add(PCacheLDAPAuthority.ROLE_ADMIN); } }
- *
- return roles;
- }*/
-
-
+ /**
+ * the real mapping method. Currently, all users who are able to
+ * authenticate are assigned with the same ROLE_LDAP_USER.
+ *
+ * @param authorities a set of original granted authorities assigned by ldapAuthProvider
+ * @return a new set of granted authorities greated in the method
+ */