On Feb 4, 2010, at 1:13 PM, Nils Breunese wrote:

> 
> Hello all,
> 
> Our users are in LDAP and we have ran into some problems. The first one was 
> that PUR broke when logging in as an LDAP user. This has been reported by a 
> colleague of mine [0], and has been fixed partially in STK 1.2.2 and 
> completely in STK 1.2.3. But now we run into a problem when using the 
> commenting module with LDAP users.
> 
> ----
> Method public java.lang.String 
> info.magnolia.cms.security.ExternalUser.getProperty(java.lang.String) threw 
> an exception when invoked on info.magnolia.cms.security.externalu...@1d5d81a
> The problematic instruction:
> ----------
> ==> ${ctx.user.getProperty('email')!''} [on line 93, column 89 in 
> info/magnolia/module/commenting/frontend/comment.inc.ftl]
> in user-directive messageform [on line 60, column 5 in 
> info/magnolia/module/commenting/frontend/commentPreview.ftl]
> ----------
> 
> (...)
> 
> Caused by: java.lang.UnsupportedOperationException: not implemented for this 
> ExternalUser
> ----
> 
> Magnolia's Grégory Joseph asked me to take the discussion from JIRA to the 
> users list. So, eh yeah, well, here we are. :o)

Yeah - reason is, the issue itself was fixed in STK and the discussion becomes 
larger than that.

So, two things:
1) this problem has been fixed more generally with MAGNOLIA-3037[1]. This is 
available in the trunk (4.3-m1, 4.3-snapshot). It could be backported to the 
4.2 branch too, but there are no plans to do a new 4.2 release soon.

2) in all cases, if you need to access more user properties than the basic 
name, fullName and language, you will need to extend 
info.magnolia.jaas.sp.ldap.LDAPAuthenticationModule#setEntity to push the 
desired properties into the Entity object, and the 
info.magnolia.cms.security.ExternalUserManager/info.magnolia.cms.security.ExternalUser
 pair to expose it.
(and register the UserManager appropriately [2]). As of yet, we have no 
one-size-fits-all solution for this, so depending on your projects' needs, this 
might be simple (if all you need is read those properties) or complex (if you 
also need to manage ldap users via Magnolia)

Cheers,

-greg


[1] http://jira.magnolia-cms.com/browse/MAGNOLIA-3037
[2] http://documentation.magnolia-cms.com/modules/ldap.html - about to be 
updated with the info above
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to