Using LoginManager with users stored in several Specialists
Hi, I have two different types of users - Customers and Resellers. Each one is stored in a separate ZClass and managed by a separate Specialist. I need to be able to authenticate users from both user lists, as well as a third group for people working locally on the site - Managers, Customer Service, etc. So I thought I could store a 'LoginProperties' propertysheet in each of the two ZClasses, and use a separate UserSource to access each one. The local users will be handled by a PersistentUserSource. My questions are: - Is this a good idea? It seems better to me than storing all users in a PersistentUSerSource (from the Membership product) and mapping from it to the Customer and Reseller classes. Each type of user is created and managed in different ways so it won't make sense to manage all users from one place. - I'm not sure how to customize a UserSource to access the propertysheets on the Customer and Reseller classes. The easiest way seems to be to define userExists, userRoles and userAuthenticate methods in a GenericUserSource, but I don't think it's a good idea - I still wouldn't know how to make changes to the propertysheet from the LoginManager (for example, changePassword should be a method of acl_users, not of the user classes, because it does the same thing for all user types), and there is no caching. Should I write my own UserSource? Or can I do it with Data Plug-ins? I'd like to keep the solution simple, but I do want it to be efficient (fast and cached). TIA, Itai -- Itai Tavor "Je sautille, donc je suis." C3Works itai@c3works.com - Kermit the Frog "If you haven't got your health, you haven't got anything"
In article <a05001900b61b0b6ac87c@[10.0.1.2]>, Itai Tavor <itai@optusnet.com.au> wrote:
- I'm not sure how to customize a UserSource to access the propertysheets on the Customer and Reseller classes. The easiest way seems to be to define userExists, userRoles and userAuthenticate methods in a GenericUserSource, but I don't think it's a good idea - I still wouldn't know how to make changes to the propertysheet from the LoginManager (for example, changePassword should be a method of acl_users, not of the user classes, because it does the same thing for all user types), and there is no caching. Should I write my own UserSource? Or can I do it with Data Plug-ins? I'd like to keep the solution simple, but I do want it to be efficient (fast and cached).
Generic User Source is basically for people who are familar with GUF and want some degree of backward compatability. There was also a time where it was the only choice :-) Now there is "User Source", which is to LoginManager what Rack is to Specialist. It's completely general, defaulting to storing things persistently, but overrideable with SkinScript and the "load from existence of attribute blah" to do anything you want. It's much more Generic than Generic User Source, actually :) Have a look at the SkinScript reference for the "Object Remapping" example (last one under WITH ... COMPUTE ...) of how to make a Rack that retrieves proxyies for objects from a different Specialist. You can direcly apply this same technique to have a User Source provide users based on objects in other Specialists.
participants (2)
-
Itai Tavor -
tsarnaļ¼ endicor.com