0
votes

I have the latest stable version of trac(0.12.3) installed on my machine in a single environment,multi project setup. I have successfully been able to install AccountManagerPlugin. What I need now, is that for every project initialized, the user permissions need to be set from the Admin panel. I want that it should be the same for all projects.

I think TracUserSyncPlugin should suffice my needs. However, when I try to install this, I get the error "could not find required distribution Trac<0.12". Does that mean I need to have trac<0.12 installed to use this plugin ? Is there any workaround to make this work? Any other suggestions to fulfill my requirement ?

Edit I have modified the project initialization script to add/remove permissions to authenticated and anonymous users.

It is a perl script that is used to generate Trac projects and svn repositories for any new project. By default, one username is added to the script to make it the TRAC ADMIN. I have also added the commands to remove permissions from anonymous users and add permissions to authenticated users.

Since, every time a new project is needed to be intialized, this script is run, so that way all the anonymous and authenticated users share the same permissions. Also, I am using SharedAuthCookie plugin for the users to be able to view various projects without being prompted for login again and again. This does cause all users to be able to access all projects, but it suits my requirements, so works for me.

1
Since I couldn't make SharedAuthCookie work, I extended AccountManager lately to include a similar functionality. For now it's only in the trunk branch. See trac-hacks.org/wiki/CookBook/… for details.hasienda
@haseinda : Thanks a lot ! I will get the plugin from trunk branch.gentrobot
You're welcome. Please note, that this feature is still in beta state, because of repeated tracd execution breakups every 5-6 days using the SQLite db backend. I didn't figured out, if this is just about the backend, and how to resolve this. Report your findings and related thought to trac-hacks.org/ticket/9676, please.hasienda
@haseinda : I have removed my older version of Account Manager Plugin and checked out and installed the one from trunk. I have my trac.ini file located at /etc/ and all the projects inherit from this. So I modified this file to include the default path for the cookies as : trac_auth = /trac/cookie trac_auth_session = /trac/session But this doesn't log in the user for all the projects. If I log in to one project, and go to the next one, I am asked to log in there too. Coming back to the previous project does save my session and I am not asked to log in again.gentrobot
@haseinda: How do I make sure that if I log in for 1 project, I shouldn't be asked to log in for other projects?gentrobot

1 Answers

2
votes

The TracUserSync plugin is unfinished and hasn't been touched in over two years. There's even a note indicating that it shouldn't be used in production environments. Unless you're okay with debugging and modifying the plugin as you go, I highly recommend that it not be used on any real deployments.

If the risks are acceptable, there's a chance that it might work in Trac 0.12 if you made one small change to it:

Download the source and find the install_requires = line inside setup.py. Remove the entry on that line that says 'Trac<0.12', then save the file and re-build the plugin.

I have never used this plugin so I don't know if this is enough to get it working. Many 0.11 plugins work with 0.12 without any real changes, so you may get lucky. This plugin is unfinished, though, so there's always a chance that it never worked in the first place.