Index: davical.git/dba/appuser_permissions.txt --- davical.git/dba/appuser_permissions.txt.orig 2011-10-06 11:14:54.000000000 +0200 +++ davical.git/dba/appuser_permissions.txt 2011-10-25 09:45:26.000000000 +0200 @@ -1,66 +1,69 @@ -# -# This file is used by update-rscds-database to set the correct -# permissions for the application user. In newer installations -# the application user will probably be called app_davical (and -# the administrative user will be called dba_davical) but in -# older installations the application user was called 'general' -# and the administrative user was probably 'postgres'. -# -# See the wiki topic 'Database/Users' for more discussion. -# -# This file includes lines like: -# GRANT SELECT,... -# which define what gets granted to the following lines like: -# ON table1, table2, sequence1, function 3, view4, ... -# no user-serviceable parts inside, all whitespace is ignored, -# your mileage should not vary :-) -# +-- +-- This file is used by update-rscds-database to set the correct +-- permissions for the application user. In newer installations +-- the application user will probably be called app_davical (and +-- the administrative user will be called dba_davical) but in +-- older installations the application user was called 'general' +-- and the administrative user was probably 'postgres'. +-- +-- See the wiki topic 'Database/Users' for more discussion. +-- +-- This file includes lines like: +-- GRANT SELECT,... +-- which define what gets granted to the following lines like: +-- ON table1, table2, sequence1, function 3, view4, ... +-- no user-serviceable parts inside, all whitespace is ignored, +-- your mileage should not vary :-) +-- GRANT SELECT,INSERT,UPDATE,DELETE - ON collection - ON caldav_data - ON calendar_item - ON relationship - ON locks - ON property - ON freebusy_ticket - ON usr - ON usr_setting - ON roles - ON role_member - ON session - ON tmp_password - ON group_member - ON principal - ON relationship_type - ON sync_tokens - ON sync_changes - ON grants - ON dav_principal - ON access_ticket - ON dav_binding - ON calendar_alarm - ON calendar_attendee - ON addressbook_resource - ON addressbook_address_adr - ON addressbook_address_tel - ON addressbook_address_email - ON timezones - ON tz_aliases - ON tz_localnames + ON collection, + caldav_data, + calendar_item, + relationship, + locks, + property, + freebusy_ticket, + usr, + usr_setting, + roles, + role_member, + session, + tmp_password, + group_member, + principal, + relationship_type, + sync_tokens, + sync_changes, + grants, + dav_principal, + access_ticket, + dav_binding, + calendar_alarm, + calendar_attendee, + addressbook_resource, + addressbook_address_adr, + addressbook_address_tel, + addressbook_address_email, + timezones, + tz_aliases, + tz_localnames + TO davical; GRANT SELECT,UPDATE ON relationship_type_rt_id_seq - ON dav_id_seq - ON usr_user_no_seq - ON roles_role_no_seq - ON session_session_id_seq - ON principal_type_principal_type_id_seq - ON sync_tokens_sync_token_seq - ON timezones_our_tzno_seq + dav_id_seq, + usr_user_no_seq, + roles_role_no_seq, + session_session_id_seq, + principal_type_principal_type_id_seq, + sync_tokens_sync_token_seq, + timezones_our_tzno_seq + TO davical; GRANT SELECT - ON supported_locales - ON awl_db_revision - ON principal_type + ON supported_locales, + awl_db_revision, + principal_type + TO davical; Index: davical.git/dba/views/dav_principal.sql --- davical.git/dba/views/dav_principal.sql.orig 2010-02-23 11:29:07.000000000 +0100 +++ davical.git/dba/views/dav_principal.sql 2011-10-25 09:38:48.000000000 +0200 @@ -2,7 +2,6 @@ -- record 1:1 with the principal table -DROP VIEW dav_principal CASCADE; CREATE OR REPLACE VIEW dav_principal AS SELECT user_no, usr.active AS user_active, joined AS created, updated AS modified, username, password, fullname, email, Index: davical.git/inc/always.php.in --- davical.git/inc/always.php.in.orig 2011-09-25 11:04:29.000000000 +0200 +++ davical.git/inc/always.php.in 2011-10-25 09:38:48.000000000 +0200 @@ -58,6 +58,7 @@ $c->images = $c->base_url . '/images'; // Add a default for newly created users +date_default_timezone_set("UTC"); $c->template_usr = array( 'active' => true, 'locale' => 'en_GB', 'date_format_type' => 'E', @@ -125,20 +126,8 @@ * too early. */ ob_start( ); -if ( @file_exists('/etc/davical/'.$_SERVER['SERVER_NAME'].'-conf.php') ) { - include('/etc/davical/'.$_SERVER['SERVER_NAME'].'-conf.php'); -} -else if ( @file_exists('/etc/davical/config.php') ) { - include('/etc/davical/config.php'); -} -else if ( @file_exists('/usr/local/etc/davical/'.$_SERVER['SERVER_NAME'].'-conf.php') ) { - include('/usr/local/etc/davical/'.$_SERVER['SERVER_NAME'].'-conf.php'); -} -else if ( @file_exists('/usr/local/etc/davical/config.php') ) { - include('/usr/local/etc/davical/config.php'); -} -else if ( @file_exists('../config/config.php') ) { - include('../config/config.php'); +if ( @file_exists("@l_prefix@/etc/davical/davical-config.php") ) { + include_once("@l_prefix@/etc/davical/davical-config.php"); } else if ( @file_exists('config/config.php') ) { include('config/config.php');