Associating Matrix info with LDAP users


(Phil Mcphee) #1

Hi all... I'm about to launch LDAP authentication on a pretty big site with lots of users, and one thing I want to be able to do is allow users to store site preferences associated with their logon. If I was just using native Matrix user asset types I would just store those preferences as metadata or linked assets under the user asset. With users imported from the LDAP bridge though that doesn't seem to be possible as those assets don't have a metadata screen and you can't link assets underneath them.

 

Does anyone have any idea on how to achieve this through some other means? If not this might be one for Roadmap I guess!


(Edison Wang) #2

LDAP user is shadow asset, which is not supported by metadata system, workflow system etc.

It's also impossible to create child asset under it.

 

It's possible to link it to a real asset though. Maybe you can store metadata there.


(Phil Mcphee) #3

Yeah that would work, but a bit impractical for thousands of users. I'd have to get the site to create (dynamically using JS API probably) a "preferences" asset for every LDAP user then new link the shadow asset underneath it. All sounds a bit messy with lots of people. Thanks for the idea though!


(Robin Shi) #4

Not sure what content type (text/HTML/image) will be used as site preferences. I'd suggest you look into the source - LDAP. Matrix can map a few fields from LDAP into the shadow asset's field.


(Phil Mcphee) #5

Yeah but if I'm storing user-chosen site preferences they would need to be dynamically changeable by the site, which would surely involve Matrix writing back to LDAP (a definite no-no!).


(Robin Shi) #6

Matrix is hard to be personalized. We thought about a solution using remote-contented PHP, but you need a programmer.


(Phil Mcphee) #7

I agree... it's easy enough if you're using native Matrix user assets, but with LDAP nigh-on impossible! I might use cookies for my current project (lame) and put something into Roadmap to see if there's anything that can be done in future...


(Benjamin Pearson) #8

You might be able to use DB Data Source to get/store the preferences, then use the JS API to dynamically use the preferences as you need them, the only thing is it might be a bit slow. And it would take a few data sources to control the database.