- try {
- this.userDn = new LdapName(authorization.getName());
- } catch (InvalidNameException e) {
- throw new CmsException("Invalid user name " + authorization.getName(), e);
+ if (authorization.getName() != null)
+ try {
+ this.userDn = new LdapName(authorization.getName());
+ this.anonymous = false;
+ } catch (InvalidNameException e) {
+ throw new CmsException("Invalid user name " + authorization.getName(), e);
+ }
+ else {
+ this.userDn = NodeSecurityUtils.ROLE_ANONYMOUS_NAME;
+ this.anonymous = true;