0

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.

gentrobot
  • 673
  • 6
  • 25
  • 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 http://trac-hacks.org/wiki/CookBook/AccountManagerPluginConfiguration#SingleSignOn for details. – hasienda Feb 23 '12 at 22:19
  • @haseinda : Thanks a lot ! I will get the plugin from trunk branch. – gentrobot Feb 25 '12 at 07:28
  • 1
    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 http://trac-hacks.org/ticket/9676, please. – hasienda Feb 27 '12 at 00:37
  • @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 Feb 28 '12 at 11:17
  • @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 Feb 28 '12 at 11:19
  • What do you need, that is not explained in http://trac-hacks.org/wiki/CookBook/AccountManagerPluginConfiguration#SingleSignOn? – hasienda Feb 28 '12 at 20:20
  • @haseinda: I have already tried the steps mentioned in the CookBook, but somehow, It doesn't work for me. – gentrobot Feb 29 '12 at 08:25
  • @haseinda: you can find a detail about my issue at http://stackoverflow.com/questions/9495827/trac-single-signon-not-working-as-mentioned-in-the-cookbook – gentrobot Feb 29 '12 at 08:35
  • Already seen that and commented there. Better try using #trac IRC channel at freenode.net or contact me directly (see maintainer info for AcctMgr) to get this sorted. – hasienda Feb 29 '12 at 23:11

1 Answers1

2

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.

bta
  • 43,959
  • 6
  • 69
  • 99
  • your answer surely does the work and hence I have accepted it. However, I have decided to go with haseinda's comment above and get the plugin from the trunk branch. That way, I won't even need an additional plugin. – gentrobot Feb 25 '12 at 07:30