On Wednesday 19 January 2011 08:58 PM, C. Michael Pilato wrote:
> On 01/19/2011 08:48 AM, Arwin Arni wrote:
>> Hi All,
>> There are a couple of functions (authz_get_global_access,
>> authz_global_parse_section) inside libsvn_repos/authz.c which completely
>> threw me off track by virtue of their names. The names seem to suggest that
>> they check for global access to the repository, which is very misleading.
>> What they actually do is check to see if the user has *any* kind of access
>> to *any* part of the repository.
>> This patch renames these functions to convey a better meaning, and also
>> inserts a comment that explains the function better. I have attached the
>> patch and log message.
>> Arwin Arni
> Makes sense to me. Your patch had a small problem (see below), but I'll fix
> that and commit it up.
>> Index: subversion/libsvn_repos/authz.c
>> --- subversion/libsvn_repos/authz.c (revision 1060218)
>> +++ subversion/libsvn_repos/authz.c (working copy)
>> @@ -743,12 +748,12 @@
>> const char *current_path = path;
>> - /* If PATH is NULL, do a global access lookup. */
>> + /* If PATH is NULL, check if the user has *any* access. */
>> if (!path)
>> - *access_granted = authz_get_global_access(authz->cfg, repos_name,
>> - user, required_access,
>> - pool);
>> + *access_granted = authz_get_any_acess(authz->cfg, repos_name,
> Oops! ^^^^^
Extremely sorry about that. Thanks.
Received on 2011-01-19 16:39:46 CET