|
Lines 102-125
Link Here
|
| 102 |
#define DIR_OR_FILE(is_dir) ((is_dir) ? "directory" : "file") |
102 |
#define DIR_OR_FILE(is_dir) ((is_dir) ? "directory" : "file") |
| 103 |
|
103 |
|
| 104 |
|
104 |
|
| 105 |
struct authz_read_baton |
105 |
svn_error_t *dav_svn_authz_read(svn_boolean_t *allowed, |
|
|
106 |
svn_fs_root_t *root, |
| 107 |
const char *path, |
| 108 |
void *baton, |
| 109 |
apr_pool_t *pool) |
| 106 |
{ |
110 |
{ |
| 107 |
/* The original request, needed to generate a subrequest. */ |
111 |
dav_svn_authz_read_baton *arb = baton; |
| 108 |
request_rec *r; |
|
|
| 109 |
|
| 110 |
/* We need this to construct a URI based on a repository abs path. */ |
| 111 |
const dav_svn_repos *repos; |
| 112 |
}; |
| 113 |
|
| 114 |
|
| 115 |
/* This implements 'svn_repos_authz_func_t'. */ |
| 116 |
static svn_error_t *authz_read(svn_boolean_t *allowed, |
| 117 |
svn_fs_root_t *root, |
| 118 |
const char *path, |
| 119 |
void *baton, |
| 120 |
apr_pool_t *pool) |
| 121 |
{ |
| 122 |
struct authz_read_baton *arb = baton; |
| 123 |
request_rec *subreq = NULL; |
112 |
request_rec *subreq = NULL; |
| 124 |
const char *uri; |
113 |
const char *uri; |
| 125 |
svn_revnum_t rev = SVN_INVALID_REVNUM; |
114 |
svn_revnum_t rev = SVN_INVALID_REVNUM; |
|
Lines 1002-1008
Link Here
|
| 1002 |
svn_boolean_t recurse = TRUE; |
991 |
svn_boolean_t recurse = TRUE; |
| 1003 |
svn_boolean_t resource_walk = FALSE; |
992 |
svn_boolean_t resource_walk = FALSE; |
| 1004 |
svn_boolean_t ignore_ancestry = FALSE; |
993 |
svn_boolean_t ignore_ancestry = FALSE; |
| 1005 |
struct authz_read_baton arb; |
994 |
dav_svn_authz_read_baton arb; |
| 1006 |
apr_pool_t *subpool = svn_pool_create(resource->pool); |
995 |
apr_pool_t *subpool = svn_pool_create(resource->pool); |
| 1007 |
|
996 |
|
| 1008 |
/* Construct the authz read check baton. */ |
997 |
/* Construct the authz read check baton. */ |
|
Lines 1243-1249
Link Here
|
| 1243 |
recurse, |
1232 |
recurse, |
| 1244 |
ignore_ancestry, |
1233 |
ignore_ancestry, |
| 1245 |
editor, &uc, |
1234 |
editor, &uc, |
| 1246 |
authz_read, |
1235 |
dav_svn_authz_read, |
| 1247 |
&arb, |
1236 |
&arb, |
| 1248 |
resource->pool))) |
1237 |
resource->pool))) |
| 1249 |
{ |
1238 |
{ |
|
Lines 1412-1418
Link Here
|
| 1412 |
uc.rev_root, dst_path, |
1401 |
uc.rev_root, dst_path, |
| 1413 |
/* re-use the editor */ |
1402 |
/* re-use the editor */ |
| 1414 |
editor, &uc, |
1403 |
editor, &uc, |
| 1415 |
authz_read, |
1404 |
dav_svn_authz_read, |
| 1416 |
&arb, |
1405 |
&arb, |
| 1417 |
FALSE, /* no text deltas */ |
1406 |
FALSE, /* no text deltas */ |
| 1418 |
recurse, |
1407 |
recurse, |