mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-31 03:34:18 +00:00
When listing users we should not list users that we have no access to.
This commit is contained in:
parent
e576d884a3
commit
a6fccffb86
@ -210,6 +210,7 @@ function get_collection_contents( $depth, $user_no, $collection ) {
|
|||||||
if ( $collection->dav_name == '/' ) {
|
if ( $collection->dav_name == '/' ) {
|
||||||
$sql = "SELECT user_no, user_no, '/' || username || '/' AS dav_name, md5( '/' || username || '/') AS dav_etag, ";
|
$sql = "SELECT user_no, user_no, '/' || username || '/' AS dav_name, md5( '/' || username || '/') AS dav_etag, ";
|
||||||
$sql .= "updated AS created, to_char(updated at time zone 'GMT',?) AS modified, fullname AS dav_displayname, FALSE AS is_calendar FROM usr ";
|
$sql .= "updated AS created, to_char(updated at time zone 'GMT',?) AS modified, fullname AS dav_displayname, FALSE AS is_calendar FROM usr ";
|
||||||
|
$sql .= "WHERE user_no=$session->user_no OR get_permissions($session->user_no,user_no) ~ 'R';";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql = "SELECT user_no, dav_name, dav_etag, created, to_char(modified at time zone 'GMT',?), dav_displayname, is_calendar FROM collection WHERE parent_container=".qpg($collection->dav_name);
|
$sql = "SELECT user_no, dav_name, dav_etag, created, to_char(modified at time zone 'GMT',?), dav_displayname, is_calendar FROM collection WHERE parent_container=".qpg($collection->dav_name);
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
HTTP/1.1 207 Multi-Status
|
HTTP/1.1 207 Multi-Status
|
||||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||||
Server: Apache/2.2.3 (Debian) DAV/2
|
Server: Apache/2.2.3 (Debian) DAV/2
|
||||||
ETag: "1e91289a2ef6640fadb7d5c9e6c5ebbb"
|
ETag: "c6f452525856be90cb2193abb6151a59"
|
||||||
Content-Length: 3214
|
Content-Length: 1790
|
||||||
Content-Type: text/xml;charset=UTF-8
|
Content-Type: text/xml;charset=UTF-8
|
||||||
|
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
@ -20,32 +20,6 @@ Content-Type: text/xml;charset=UTF-8
|
|||||||
<status>HTTP/1.1 200 OK</status>
|
<status>HTTP/1.1 200 OK</status>
|
||||||
</propstat>
|
</propstat>
|
||||||
</response>
|
</response>
|
||||||
<response>
|
|
||||||
<href>/caldav.php/admin/</href>
|
|
||||||
<propstat>
|
|
||||||
<prop>
|
|
||||||
<getcontentlength/>
|
|
||||||
<getcontenttype>httpd/unix-directory</getcontenttype>
|
|
||||||
<resourcetype>
|
|
||||||
<collection/>
|
|
||||||
</resourcetype>
|
|
||||||
</prop>
|
|
||||||
<status>HTTP/1.1 200 OK</status>
|
|
||||||
</propstat>
|
|
||||||
</response>
|
|
||||||
<response>
|
|
||||||
<href>/caldav.php/andrew/</href>
|
|
||||||
<propstat>
|
|
||||||
<prop>
|
|
||||||
<getcontentlength/>
|
|
||||||
<getcontenttype>httpd/unix-directory</getcontenttype>
|
|
||||||
<resourcetype>
|
|
||||||
<collection/>
|
|
||||||
</resourcetype>
|
|
||||||
</prop>
|
|
||||||
<status>HTTP/1.1 200 OK</status>
|
|
||||||
</propstat>
|
|
||||||
</response>
|
|
||||||
<response>
|
<response>
|
||||||
<href>/caldav.php/user1/</href>
|
<href>/caldav.php/user1/</href>
|
||||||
<propstat>
|
<propstat>
|
||||||
@ -59,19 +33,6 @@ Content-Type: text/xml;charset=UTF-8
|
|||||||
<status>HTTP/1.1 200 OK</status>
|
<status>HTTP/1.1 200 OK</status>
|
||||||
</propstat>
|
</propstat>
|
||||||
</response>
|
</response>
|
||||||
<response>
|
|
||||||
<href>/caldav.php/user2/</href>
|
|
||||||
<propstat>
|
|
||||||
<prop>
|
|
||||||
<getcontentlength/>
|
|
||||||
<getcontenttype>httpd/unix-directory</getcontenttype>
|
|
||||||
<resourcetype>
|
|
||||||
<collection/>
|
|
||||||
</resourcetype>
|
|
||||||
</prop>
|
|
||||||
<status>HTTP/1.1 200 OK</status>
|
|
||||||
</propstat>
|
|
||||||
</response>
|
|
||||||
<response>
|
<response>
|
||||||
<href>/caldav.php/manager1/</href>
|
<href>/caldav.php/manager1/</href>
|
||||||
<propstat>
|
<propstat>
|
||||||
@ -124,30 +85,4 @@ Content-Type: text/xml;charset=UTF-8
|
|||||||
<status>HTTP/1.1 200 OK</status>
|
<status>HTTP/1.1 200 OK</status>
|
||||||
</propstat>
|
</propstat>
|
||||||
</response>
|
</response>
|
||||||
<response>
|
|
||||||
<href>/caldav.php/resmgr1/</href>
|
|
||||||
<propstat>
|
|
||||||
<prop>
|
|
||||||
<getcontentlength/>
|
|
||||||
<getcontenttype>httpd/unix-directory</getcontenttype>
|
|
||||||
<resourcetype>
|
|
||||||
<collection/>
|
|
||||||
</resourcetype>
|
|
||||||
</prop>
|
|
||||||
<status>HTTP/1.1 200 OK</status>
|
|
||||||
</propstat>
|
|
||||||
</response>
|
|
||||||
<response>
|
|
||||||
<href>/caldav.php/teamclient1/</href>
|
|
||||||
<propstat>
|
|
||||||
<prop>
|
|
||||||
<getcontentlength/>
|
|
||||||
<getcontenttype>httpd/unix-directory</getcontenttype>
|
|
||||||
<resourcetype>
|
|
||||||
<collection/>
|
|
||||||
</resourcetype>
|
|
||||||
</prop>
|
|
||||||
<status>HTTP/1.1 200 OK</status>
|
|
||||||
</propstat>
|
|
||||||
</response>
|
|
||||||
</multistatus>
|
</multistatus>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user