[Rt-devel] rt-setup-database insert action doesn't use plugins Overlays

Emmanuel Lacour elacour at easter-eggs.com
Fri May 21 11:00:39 EDT 2010


On Fri, May 21, 2010 at 04:37:13PM +0200, Emmanuel Lacour wrote:
> 
> I have a data file with an @Final that create users. I would like that
> RT::User->Create call the CanonicalizeUser from
> RT::Authen::ExternalAuth, but it doesn't, it just call the one from
> lib/RT/User_Overlay.pm.
> 
> Thought in RT::Handle->InsertData, there is a call to RT::Init which
> setup Plugins and @INC is ok in @Final of my file :(
> 
> I can't find why it doesn't works :( someone to help me?
> 

One way:

--- rt-setup-database~   2010-05-21 16:54:28.000000000 +0200
+++ rt-setup-database  2010-05-21 16:56:06.000000000 +0200
@@ -82,7 +82,9 @@
 BEGIN {
     use RT;
     RT::LoadConfig();
+    RT::InitPluginPaths();
     RT::InitClasses();
+    RT::InitPlugins();
 }
 
 use Term::ReadKey;


Thought I think it's not a goot idea, would be better to be able to Init
plugins if needed in the datafile. I tried InitClasses+InitPlugins in the sub
of my @Final, but it doesn't work.


More information about the rt-devel mailing list