On Feb 8, 9:44 pm, "Danny Adair" <[EMAIL PROTECTED]> wrote:
>
> I'm currently letting Apache do authentication against sqlite for trac, and
> only allow authenticated users. The same database also holds user profiles
> with lots of other information. What is the cleanest way to provide the
> "full name"/"email address" information to trac?
>
> I would like to disable the form from trac.Settings and pull everything from
> the database.
> Do I need to create a session for this? If yes, what's the best way to do
> this?

If you are patching the Trac source, you might as well do something
even simpler: Write a replacement for
trac.env.Environment.get_known_users() (or thereabouts :-). It is the
one place that provides user data to whatever modules request it.

All my users are known users defined in the permissions, so I just use
a lookup for project permissions instead and return a tuple of what I
need with (login, login, login) as I don't need more in common usage
as email=login. Has been working like a charm since Trac 0.8.4 at
least :-) If you have all the data in a table in the same database,
even better - that should not be many lines of code.

And yes, I have disabled trac.Settings.* as that provides nothing
useful in this setup.

Would really like to see some form of IUserDirectory in Trac source,
but until then I might as well patch in this simple manner. I am
actually using some Python magic to do runtime replacement of the
class method from my own plugin, so I don't have to change the actual
Trac source.


:::simon
www.coderesort.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" 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/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to