I ended up putting it in as a vendor as it is all in one file. Thanks for your response! Shawn
On Aug 1, 9:31 am, euphrate_ylb <[EMAIL PROTECTED]> wrote: > Hi, > > I understand that "cutting your dev into pieces" is quite bothering. > It seems quite ugly for a developer to copy/paste his files in ten > different folders. However, you should do it this way because this is > where your source code should be since your are dealing with data, > business logic ... My point is : Don't gather all your sources in a > single vendor folder only because cakephp doesn't have yet some kind > of package manager that easliy deploy in a web app cake extensions > (plugins, vendors, behavior, ). > > Therefore, because your app is consumming data from a LDAP directory, > you should implement (or use) some kind LDAP datasoruce. Then you > should model your data in a LdapUser model that provides a convinient > way for using LDAP data. Finally you should handle in a controller > authentication issues. > > This is just my opinion ... I hope it may help. > > ylb > > On Jul 31, 3:46 pm, starkey <[EMAIL PROTECTED]> wrote: > > > Good morning, > > > I'm porting an LDAP connector to Cake and am trying to figure out the > > best way to do it without cutting it up into pieces. Basically, the > > connector authenticates someone against LDAP and then loads relevant > > LDAP data (and some other data) into the session. > > > So the object needs access to LDAP and the SessionComponent. > > > The LDAP connector will be used in the AppController's beforeFilter > > method to insure the user is logged in and is who they say they are. > > > I thought about putting it in Vendor because it has LDAP access and > > business logic... however gaining access to the Session isn't > > intuitive (to me at least). > > > Then I thought about Model because of the LDAP connection... except it > > accesses the Session which belongs to Controllers and has business > > logic... so I thought about a Component... > > > And now I'm asking you, what do you think is the "Cake" way to do > > this? > > > By the way, when is the session started? I've tried to access it in a > > constructor and it is NULL. > > > Thanks! > > Shawn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
