Hi there. I''ve started messing around with rails, and I have to say that I think I''m in love... :) I''m needing to do a major rewrite and consolidation of my intranet, and luckily enough it seems as if my existing database schemas fit in perfectly with the rails way of doing things. I''ve been quite impressed with the fact that in less than two hours I''ve been able to replicate about 90% of the functionality of some rather complex PHP sites in rails, sites that took a fair while to develop. It''s wonderful to be able to concentrate on ''real'' code, and not the database glue. Anyway, I''ve been browsing around the docs, and have had a quick look through the ActiveLDAP stuff, but I just thought I''d check with the collective wisdom of the list to see if what I want to do is as simple as it looks like it might be... LDAP is a big part of my current intranet, and before I leap headlong into rails, I''m just wondering how mature the ActiveLDAP stuff is. My main needs are for authentication via LDAP, to collect arrays of user and computer records, and to give my HR people an interface to edit the addressbook details of user records. Say I''m talking about my current computer asset management app where I can define a computer as having a certain IP address and/or DNS entry associated with it, and an owner that comes from my LDAP directory. Is it as simple as being able to define a model where the data source is LDAP rather than MySQL, and being able to mix and match them? ie, can I do something roughly like: class Person < ActiveLDAP::Base has_many :computers end class Computer < ActiveRecord::Base belongs_to :person end without having to write all the LDAP glue? I guess what it comes down to is just like I don''t have to worry about all the mysql_query stuff that I do in PHP with rails, do I also not have to worry about the equivalent ldap_search stuff that I currently do? cheers, nigel -- Nigel Kersten Systems Administrator College of Fine Arts, UNSW Sydney, Australia. CRICOS Provider Code: 00098G _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
> LDAP is a big part of my current intranet, and before I leap headlong > into rails, I''m just wondering how mature the ActiveLDAP stuff is. My > main needs are for authentication via LDAP, to collect arrays of user > and computer records, and to give my HR people an interface to edit the > addressbook details of user records.The quickest and easiest solution for me was to use Apache''s mod_auth_ldap and let it handle the authentication, and after a user has been authenticated, it provides their username via the @params.env[''REMOTE_USER''] variable. I have some helper functions which then use this name to lookup if they are an administrator or not and customize the view based on what they are able to do. HTH, Caleb
On 28/04/2005, at 10:23 PM, Caleb Tennis wrote:>> LDAP is a big part of my current intranet, and before I leap headlong >> into rails, I''m just wondering how mature the ActiveLDAP stuff is. My >> main needs are for authentication via LDAP, to collect arrays of user >> and computer records, and to give my HR people an interface to edit >> the >> addressbook details of user records. > > The quickest and easiest solution for me was to use Apache''s > mod_auth_ldap and > let it handle the authentication, and after a user has been > authenticated, it > provides their username via the @params.env[''REMOTE_USER''] variable. > I have > some helper functions which then use this name to lookup if they are an > administrator or not and customize the view based on what they are > able to > do.Yup, that''s how I do things with PHP, so was planning to do the same with Ruby. Buggered if I can get ActiveLDAP to work on OS X though, but I''m still getting my head around the whole way ruby has of installing stuff. I''m tempted to just go back to source for everything. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 4/28/05, Caleb Tennis <caleb-PfRr3eUzJn1Wk0Htik3J/w@public.gmane.org> wrote:> > > LDAP is a big part of my current intranet, and before I leap headlong > > into rails, I''m just wondering how mature the ActiveLDAP stuff is. My > > main needs are for authentication via LDAP, to collect arrays of user > > and computer records, and to give my HR people an interface to edit the > > addressbook details of user records. > > The quickest and easiest solution for me was to use Apache''s mod_auth_ldap and > let it handle the authentication, and after a user has been authenticated, it > provides their username via the @params.env[''REMOTE_USER''] variable. I have > some helper functions which then use this name to lookup if they are an > administrator or not and customize the view based on what they are able to > do. > > HTH, > Caleb > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Could this information then be used by ActiveRecord perhaps to get the client user''s information from ActiveDirectory, and then be used to connect to a SQL Server database via a trusted connection (i.e., Windows security)?