trac.ini Editor Panel
This plugin allow the trac admin to edit the trac.ini file using Trac's admin interface. Its goal is to provide the user with a complete and user-friendly interface. The following features are provided:
- Edit and/or view one section at a time or all sections together.
- Each option comes with a lot of information (such as description, option type, stored value, default value).
- Adding new sections and options (section entries)
- Support for a security manager. This manager controls which options can be modified by the user and can also reject certain values for certain options. This plugin comes with an (optional) basic security manager (see below).
- Support for marking options as "password" (e.g. for [notification]:smtp_password) for enhanced security. Some options are already marked as "password" by default.
The ini editor provides support for a pluggable security manager. A security manager has the following functions:
- it can decide for each option whether the user can modify it, or whether it's read-only or ever hidden from the user.
- it can check each value that is to be saved and reject it if necessary
This plugin comes with two predefined security managers:
- An "empty" security manager that doesn't impose any restrictions at all (i.e. it works as if no security manager was specified).
- A basic security manager that lets you define restrictions via trac.ini (see configuration below).
Difference to IniAdminPlugin
There is a similar plugin, the IniAdminPlugin. There are some features that this plugin provides and that don't exist in the IniAdminPlugin:
- Creating new sections and (more important) new options. This allows you to even edit the sections [ticket-custom] or [ticket-workflow] which can't be done with IniAdminPlugin.
- Allows you to edit all sections at once.
- Only needs one entry in the admin menu. TracIniEditor creates one entry per section (i.e. the more plugins you've installed the more entries you'll get).
- Information about an option: the option type (list, extension list, bool), the currently stored value, the default value
- Let's you easily revert an option to its default value (using a checkbox)
- IniAdminOnly allows you to hide certain options. This plugin allows you to mark options as "read-only" thereby allowing the user to see its value but don't allowing him/her to change it.
One last difference is the way each plugin displays the options of a section: while IniAdminPlugin uses a groupbox per option, my plugin uses as list/table to display them. I find the latter option better but I guess this is a matter of taste. You can compare these two options here from screenshots I've made: IniAdminPlugin vs. TracIniAdminPanel
Configuration is done via trac.ini in the section `[ini-editor]. The following example lists the most important ones:
[ini-editor] ; Defines the security manager to use. Each security manager is a ; component on its own and must be enabled using the plugin admin ; panel or trac.ini. security-manager = IniEditorBasicSecurityManager ; Comma-separated list of options that are to be considered "password fields". ; All of Trac's password options are already predefined by default and don't ; need to be listed here. ;password-options = section|option
If you want to use the IniEditorBasicSecurityManager you need to configure it via trac.ini, too. The permissions are configured in the section [ini-editor-restrictions]. The following "options kinds" are available here (where "access level" is one of modifiable, readonly, or hidden):
- default-access: Defines the access level for options that don't get a specific access level assigned to
- section|option: Defines the access level for a specific option in a specific section (e.g. trac|mainnav).
- section|*: Defines the default access level for all options in the specified section (e.g. trac|*). This can be overwritten with the previous "option kind".
There is an example configuration provided by this plugin which resembles a white-list of "secure" options. You can find it here.
Requires Trac 1.0 (older branch available for 0.12.x also).
Existing bugs and feature requests for TracIniAdminPanelPlugin are here.
If you have any issues, create a new ticket.
Get the Plugin
You can also obtain the code from the Trac Subversion repository:
svn co http://trac-hacks.org/svn/traciniadminpanelplugin
or download zipped source.
See TracPlugins for instructions on building and installing plugins.
You can browse the source in Trac.
You can help to translate the plugin into your language: http://translations.launchpad.net/traciniadminpanel
- [PATCH] Better than separated messages for translations
- [PATCH] Use add_script_data to pass data instead directly using TemplateLoader and render.
remove white line in layout
add missing text
reduce indent a bit
see #10995: proper formating of doc texts
- screenshot-inieditor1.png (21.7 kB) -
Screenshot (1) of TracIniAdminPanel?, added by manski on 10/20/10 11:25:41.
- screenshot-inieditor2.png (28.2 kB) -
Screenshot (2) of TracIniAdminPanel?, added by manski on 10/20/10 11:26:03.
- compare-tracsection-iniadminplugin.png (22.6 kB) -
Screenshot of IniAdminPlugin: Section "trac", added by stoecker on 03/22/13 22:24:49.
- compare-tracsection-traciniadminpanel.png (32.5 kB) -
Screenshot of TracIniAdminPanel?: Section "trac", added by stoecker on 03/22/13 22:25:12.