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

Re: [PATCH] Renames functions in libsvn_repos/authz.c with better meaning

From: Arwin Arni <arwin_at_collab.net>
Date: Wed, 19 Jan 2011 21:09:03 +0530

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.
>>
>> Regards,
>> 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! ^^^^^
>
Hi Mike,

Extremely sorry about that. Thanks.

Regards,
Arwin Arni
Received on 2011-01-19 16:39:46 CET

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.