[Trac] Attn early adopters: disabling components and global config

Christopher Lenz cmlenz at gmx.de
Sat Oct 8 17:05:09 CDT 2005


Hey folks,

I today checked in a change that needs some further explanation:

  <http://projects.edgewall.com/trac/changeset/2335>

In particular, this changes the way how plugins/components are  
enabled/disabled for a Trac environment. Where you'd previously use a  
[disabled_components] section in trac.ini to specify which components  
should be disabled, you now use a [components] to both enable and  
disable components.

Only the components in the "trac" package are enabled by default. You  
can still disable specific builtin components in trac.ini, for example:

   [components]
   trac.ticket.web_ui.UpdateDetailsForTimeline = disabled

would disable the "Ticket details" provider for the timeline.

You can also disable complete modules/packages, for example:

   [components]
   trac.versioncontrol.* = disabled

would disable all the functionality related to version control (the  
repos browser, changesets, etc). Note that the wildcard at the end is  
now required! Wild cards are only allowed at the end of the option name.

But the big change is that plugins, i.e. Python code outside the  
"trac" package, needs to be enabled explicitly. For example, to use  
the WebAdmin plugin, you'll have to put the following in trac.ini:

   [components]
   webadmin.* = enabled

So what if you want to enable the WebAdmin for all your environments?  
This is where the new support for a global trac.ini file comes in.  
You can now specify global options in $prefix/share/trac/conf/ 
trac.ini (you need to create the file yourself for the time being).  
These global options are inherited by all the Trac environments.

So if you'd put the enabling of WebAdmin in the global trac.ini,  
it'll be enabled for every environment.

Cheers,
Chris
--
Christopher Lenz
   cmlenz at gmx.de
   http://www.cmlenz.net/



More information about the Trac mailing list