[Trac] Trac Global Group Management

68 views
Skip to first unread message

sujan54004

unread,
Sep 3, 2012, 6:02:16 AM9/3/12
to trac-...@googlegroups.com

Hello All,

Managing user permissions is turning out to be a very tedious tasks,
especially when there are a lot of projects.
Is is possible to manage same group permissions to all our projects. I mean
something like global group permission.
Also, I am using ldap authentication for my server. I would very much
appreciate if anyone could help.

Cheers,
Sujan
--
View this message in context: http://old.nabble.com/Trac-Global-Group-Management-tp34382430p34382430.html
Sent from the Trac Users mailing list archive at Nabble.com.

Bas van der Vlies

unread,
Sep 3, 2012, 9:01:44 AM9/3/12
to trac-...@googlegroups.com
On 09/03/2012 12:02 PM, sujan54004 wrote:
>
> Hello All,
>
> Managing user permissions is turning out to be a very tedious tasks,
> especially when there are a lot of projects.
> Is is possible to manage same group permissions to all our projects. I mean
> something like global group permission.
> Also, I am using ldap authentication for my server. I would very much
> appreciate if anyone could help.
>
> Cheers,
> Sujan
>

Sujan,

We use the unixgroups plugin for Trac and all our groups are in LDAP. We patched it because there where some performance issue
with it.

regards

--
********************************************************************
* Bas van der Vlies e-mail: ba...@sara.nl *
* SARA - Academic Computing Services Amsterdam, The Netherlands *
********************************************************************

sujan54004

unread,
Sep 5, 2012, 3:27:40 AM9/5/12
to trac-...@googlegroups.com

Hi,

Thanks a lot for the reply.
I checked out unixgroups plugin but it seems to be slow and doesn't work for
me as well. I was thinking of something that lets us manage the the users
from trac only. Permissions for unix groups and trac user groups are
different.
I am trying to install TracForge but I'm still not successful. Do you have
some idea if TracForgePlugin works well for Trac 12.03.
--
View this message in context: http://old.nabble.com/Trac-Global-Group-Management-tp34382430p34391009.html

Bas van der Vlies

unread,
Sep 5, 2012, 4:25:25 AM9/5/12
to trac-...@googlegroups.com
On 09/05/2012 09:27 AM, sujan54004 wrote:
>
> Hi,
>
> Thanks a lot for the reply.
> I checked out unixgroups plugin but it seems to be slow and doesn't work for
> me as well. I was thinking of something that lets us manage the the users
> from trac only. Permissions for unix groups and trac user groups are
> different.
> I am trying to install TracForge but I'm still not successful. Do you have
> some idea if TracForgePlugin works well for Trac 12.03.
>

We have patched it and this is our code, maybe it is useful:
{{{
from pwd import *
from grp import *
from trac.core import *
from trac.perm import IPermissionGroupProvider

class UnixGroups(Component):
implements(IPermissionGroupProvider)

# IPermissionGroupProvider methods
def get_permission_groups(self, username):
try:
maingroup = getgrgid(getpwnam(username).pw_gid).gr_name
except KeyError:
return []
othergroups = [g.gr_name for g in getgrall() if username in g.gr_mem]
return [maingroup] + othergroups

Branson Matheson

unread,
Sep 5, 2012, 6:35:01 AM9/5/12
to trac-...@googlegroups.com
You might look at the ActiveDirectoryAuth plugin ( disclaimer: I wrote it ;-) .. I have the LDAP groups exposed to AD and can be used for permissions.

Ping me if you have questions or concerns ;-)
> --
> You received this message because you are subscribed to the Google Groups "Trac Users" group.
> To post to this group, send email to trac-...@googlegroups.com.
> To unsubscribe from this group, send email to trac-users+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
>

sujan54004

unread,
Sep 13, 2012, 9:00:35 AM9/13/12
to trac-...@googlegroups.com

Hi,

I am trying your plugin but could you please help me figure out the issue of
KeyError:'sAMAccountName' ?

Error log:

File "build/bdist.linux-x86_64/egg/tracext/adauth/auth.py", line 159, in
_get_userinfo
username = attrs['sAMAccountName'][0].lower()
KeyError: 'sAMAccountName'

Cheers,
Sujan
View this message in context: http://old.nabble.com/Trac-Global-Group-Management-tp34382430p34428058.html

sujan54004

unread,
Sep 14, 2012, 10:34:25 AM9/14/12
to trac-...@googlegroups.com

Hello Everyone,

Thanks to Sandinak for such a great plugin.
I am now using ADAuthenticationPlugin for authenticating and group
management.
I am able to administer trac by using "group_admin =
CN=.....,OU=...,DC=...".

But the problem here is that I cannot give the permissions as mentioned in
the documentation of ActiveDirectoryAuthPlugin-Group Management
(http://trac-hacks.org/wiki/ActiveDirectoryAuthPlugin/GroupManagement).

I have a security group called abc_user in AD. If i use it as a group_admin,
it works great but I cannot get it working by defining as mentioned in the
examples (like: @abc_user = TRAC_ADMIN)

Can someone please help me with this.

Thanks in advance.
-Sujan
View this message in context: http://old.nabble.com/Trac-Global-Group-Management-tp34382430p34433008.html

RjOllos

unread,
Oct 1, 2012, 3:52:17 PM10/1/12
to trac-...@googlegroups.com
On Wednesday, September 5, 2012 1:26:02 AM UTC-7, Bas wrote:
We have patched it and this is our code, maybe it is useful:

It would be great if we could get that pushed back to Trac-Hacks. Could you attach your patched source to a ticket?

Bas van der Vlies

unread,
Oct 2, 2012, 4:35:18 AM10/2/12
to trac-...@googlegroups.com
> <https://trac-hacks.org/newticket?component=UnixGroupsPlugin&owner=coderanger>rjollos
>
> -
I had opened a ticket and a request:
* https://trac-hacks.org/ticket/3123

I will create a new ticket with the version attached

RjOllos

unread,
Oct 2, 2012, 1:07:02 PM10/2/12
to trac-...@googlegroups.com
On Tuesday, October 2, 2012 1:36:46 AM UTC-7, Bas wrote:
I had opened a ticket and a request: 
 * https://trac-hacks.org/ticket/3123

I will create a new ticket with the version attached

I see that you acquired about maintenance status of the plugin in that ticket. Would you be interested in taking over if I changed the permissions so you can commit? At this time, it is not maintained. 

Bas van der Vlies

unread,
Oct 3, 2012, 9:09:27 AM10/3/12
to trac-...@googlegroups.com, RjOllos
On 10/02/2012 07:07 PM, RjOllos wrote:
> On Tuesday, October 2, 2012 1:36:46 AM UTC-7, Bas wrote:
>
> I had opened a ticket and a request:
> * https://trac-hacks.org/ticket/3123 <https://trac-hacks.org/ticket/3123>
>
> I will create a new ticket with the version attached
>
>
> I see that you acquired about maintenance status of the plugin in that ticket. Would you be interested in taking over if I changed
> the permissions so you can commit? At this time, it is not maintained.
>

I have several open source projects that are consuming time ;-). I will consider it and let know what my decision will be.

regards
Reply all
Reply to author
Forward
0 new messages