[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Recursive group definition in access file.

From: Christian Jahn <christian.jahn_at_dynagroup.de>
Date: 2004-12-07 13:31:22 CET

Hello,

first off, please apologize my english grammar and limited vocabulary;
german is my native
language.

With this patch, it's possible to define groups as group members.

e.g.:

[groups]
group1 = u1, u2
group2 = u3, u4

all = @group1, @group2

[/]
@all

If the code in this patch doesn't suit your perceptions, drop it.
But it would be nice to have such a functionality.

* mod_authz_svn
   (group_contains_user): If the passed group beginns with an '@', make
a recursive call
    to resolve the group members.

MfG,
Christian Jahn

Index: subversion/mod_authz_svn/mod_authz_svn.c
===================================================================
--- subversion/mod_authz_svn/mod_authz_svn.c (Revision 12207)
+++ subversion/mod_authz_svn/mod_authz_svn.c (Arbeitskopie)
@@ -117,6 +117,16 @@
 
     for (i = 0; i < list->nelts; i++) {
        const char *group_user = APR_ARRAY_IDX(list, i, char *);
+
+ /*
+ * Checks whether a group member is a group, too.
+ */
+ if (group_user[0] == '@') {
+ if (group_contains_user(cfg, &group_user[1], user, pool)) {
+ return 1;
+ }
+ }
+
        if (!strcmp(user, group_user))
            return 1;
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 7 17:56:49 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.