mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-23 02:14:16 +00:00
Compare commits
3 Commits
e6753bd1a7
...
bb0aa4bb08
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb0aa4bb08 | ||
|
|
734d5c1f99 | ||
|
|
2f0a9e317f |
@ -1,3 +1,6 @@
|
||||
2025-01-22 Andrew Ruthven <andrew@etc.gen.nz>
|
||||
* Using a Ticket ID requires public.php
|
||||
|
||||
2024-04-15 Andrew Ruthven <andrew@etc.gen.nz>
|
||||
* Add caching of user credential success/failure
|
||||
|
||||
|
||||
@ -352,8 +352,6 @@ class CalDAVRequest
|
||||
if ( ! isset($this->timeout) || $this->timeout == 0 ) $this->timeout = (isset($c->default_lock_timeout) ? $c->default_lock_timeout : 900);
|
||||
}
|
||||
|
||||
$this->principal = new Principal('path',$this->path);
|
||||
|
||||
/**
|
||||
* RFC2518, 5.2: URL pointing to a collection SHOULD end in '/', and if it does not then
|
||||
* we SHOULD return a Content-location header with the correction...
|
||||
@ -466,7 +464,14 @@ EOSQL;
|
||||
/**
|
||||
* Extract the user whom we are accessing
|
||||
*/
|
||||
$this->principal = new DAVPrincipal( array( "path" => $this->path, "options" => $this->options ) );
|
||||
|
||||
if ( $this->options['allow_by_email'] && preg_match( '{^/(\S+@[a-z0-9][a-z0-9-]*[.][a-z0-9.-]+)/?$}i', $this->path, $matches ) ) {
|
||||
$this->principal = new DAVPrincipal( array( "email" => $matches[1], "options" => $this->options ) );
|
||||
// @dbg_error_log('caldav', 'DAVPrincipal by email: %s', print_r($this->principal, true) );
|
||||
} else {
|
||||
$this->principal = new DAVPrincipal( array( "path" => $this->path, "options" => $this->options ) );
|
||||
// @dbg_error_log('caldav', 'Principal by path: %s', $this->path );
|
||||
}
|
||||
$this->user_no = $this->principal->user_no();
|
||||
$this->username = $this->principal->username();
|
||||
$this->by_email = $this->principal->byEmail();
|
||||
|
||||
@ -463,7 +463,7 @@ EOTEMPLATE;
|
||||
if ($can_write_collection) {
|
||||
$browser->AddColumn( 'ticket_id', translate('Ticket ID'), '', '' );
|
||||
}
|
||||
$browser->AddColumn( 'target', translate('Target'), '', '<td style="white-space:nowrap;">%s</td>', "'".$c->base_url.'/caldav.php'."' ||COALESCE(d.dav_name,c.dav_name)" );
|
||||
$browser->AddColumn( 'target', translate('Target'), '', '<td style="white-space:nowrap;">%s</td>', "'".$c->base_url.'/public.php'."' ||COALESCE(d.dav_name,c.dav_name)" );
|
||||
$browser->AddColumn( 'expiry', translate('Expires'), '', '', 'TO_CHAR(expires,\'YYYYMMDD"T"HH:MI:SS\')');
|
||||
$browser->AddColumn( 'privs', translate('Privileges'), '', '', "privileges_list(privileges)" );
|
||||
if ($can_write_collection) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user