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