Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Failed to load latest commit information.
GroupBasedRedirection Removed `*.pyc` files and added pattern to `.gitignore`.
env Removed trac.ini~, should not be in the repo.
COPYING Adding license BSD 3-clause
ChangeLog (0.2) Fixed issue in which two path separators could be added in the …
INSTALL Now GroupBasedRedirection is an egg-based plugin.
README.markdown (0.2) Fixed issue in which two path separators could be added in the …
passwd Initial commit. First version. (0.2) Fixed issue in which two path separators could be added in the …



This plugin was written to allow any user to have a start page based on his group permission.

This plugin can be used as the default_handler of Trac. This way, every time a user logs in, he will be redirected to his start page.


To start using this plugin you have do copy de source-code to the Trac plugins folder. After that you have to edit trac.ini and change the line:

default_handler = ...
default_handler = GroupBasedRedirection

You have also to choose the plugin specific options. Create e new section in trac.ini named: group-based-redirection like this:

base_url = wiki/some-path/%s
blacklist = group1, group2, group3, ... blacklist_url

base_url: is the relative url that the user wil be redirected to, note that you can use %s do represent the groupname. You can use %s only once in the base_url. If base_url is not set, it defaults to /wiki.

blacklist: is a list of groupnames that should be ignored by the plugin. The defaul is anonymous, a default Trac group.

blacklist_url: is the relative URL for the blacklisted groups, which defaults to /wiki.

This plugin also creates a /redirect request handler, so anytime if you need to go to your home page just point your browser to /your-trac-url/redirect.

Important: If the user belongs to more than one group, this plugin will pick the first one (alphabetically ordered) and do the redirection.

Aditional Configuration

(thanks to Ghislain LE COZ)

As an aditional configuration you can change the link of the wiki button of the trac mainnav bar. To do this you have to create (or modify if it is already created) a new section on your trac.ini named [mainnav], like this:

wiki.href = /redirect
wiki.label = Home

With this configuration users will be able to click the (new) Home button a get redirected to the appropriate home page.

Something went wrong with that request. Please try again.