Monotone-Parent: 42e111d1ab25686092e392def5b8aa0c22f4d88b
Monotone-Revision: 4557052eb5dc8198cf068bbf758611f237e58e0f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-06-04T22:38:43 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
df229b29fd
commit
bf7ad02d5c
|
@ -1,39 +0,0 @@
|
|||
Files
|
||||
=====
|
||||
|
||||
appointment-create.psql
|
||||
- this is a template for creating appointment quick/blob tables
|
||||
- not used by code atm
|
||||
|
||||
folderinfo-create.psql
|
||||
- create folder info table (folder registry table)
|
||||
- insert some folders per default:
|
||||
- /Users
|
||||
- /Users/helge
|
||||
- /Users/helge/Calendar
|
||||
|
||||
foldertablecreate-root.psql
|
||||
- insert "/" and "/Users" parent folders (without storage, quick and type)
|
||||
|
||||
foldertablecreate-helge-privcal.psql
|
||||
- create a quick and content table for 'helge/Calendar' folder
|
||||
|
||||
register-agenor-helge-privcal.psql
|
||||
- register folder "/Users/helge/Calendar" folder in the registry table with
|
||||
a link to the proper quick and content tables
|
||||
|
||||
testapt-agenor-helge-privcal.psql
|
||||
- insert a raw iCalendar test appointment in the /Users/helge/Calendar
|
||||
folder quick and content tables
|
||||
|
||||
|
||||
Notes
|
||||
=====
|
||||
|
||||
Listing the folders of a certain user:
|
||||
|
||||
sqlite> SELECT c_path FROM SOGo_folder_info \
|
||||
WHERE c_path2 = 'test.et.di.cete-lyon';
|
||||
/Users/test.et.di.cete-lyon
|
||||
/Users/test.et.di.cete-lyon/Calendar
|
||||
/Users/test.et.di.cete-lyon/Contacts
|
|
@ -1,65 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Usage: generate-folderinfo-sql-for-users user1 [user2] [user3] [...]
|
||||
#
|
||||
|
||||
DB_USER="sogo"
|
||||
DB_PASS="sogo"
|
||||
DB_HOST="192.168.0.4"
|
||||
DB_PORT="5432"
|
||||
DB_NAME="sogo"
|
||||
TIMEZONE="Canada/Eastern"
|
||||
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
USER_ID=$1
|
||||
USER_TABLE=`echo $USER_ID | tr -s [:punct:] _`
|
||||
cat << EOF
|
||||
--
|
||||
-- (C) 2004 SKYRIX Software AG
|
||||
--
|
||||
-- TODO:
|
||||
-- add a unique constraints on path
|
||||
|
||||
UPDATE SOGo_folder_info
|
||||
SET c_acl_location = 'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_acl'
|
||||
WHERE c_folder_type = 'Container'
|
||||
AND c_path2 = '${USER_ID}';
|
||||
UPDATE SOGo_folder_info
|
||||
SET c_acl_location = 'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_contacts_acl'
|
||||
WHERE c_folder_type = 'Contact'
|
||||
AND c_path2 = '${USER_ID}';
|
||||
UPDATE SOGo_folder_info
|
||||
SET c_acl_location = 'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_privcal_acl'
|
||||
WHERE c_folder_type = 'Appointment'
|
||||
AND c_path2 = '${USER_ID}';
|
||||
|
||||
DROP TABLE SOGo_${USER_TABLE}_acls;
|
||||
DROP TABLE SOGo_${USER_TABLE}_privcal_acls;
|
||||
DROP TABLE SOGo_${USER_TABLE}_contacts_acls;
|
||||
|
||||
DROP TABLE SOGo_${USER_TABLE}_acl;
|
||||
DROP TABLE SOGo_${USER_TABLE}_privcal_acl;
|
||||
DROP TABLE SOGo_${USER_TABLE}_contacts_acl;
|
||||
|
||||
CREATE TABLE SOGo_${USER_TABLE}_acl (
|
||||
c_uid VARCHAR(256) NOT NULL,
|
||||
c_object VARCHAR(256) NOT NULL,
|
||||
c_role VARCHAR(80) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE SOGo_${USER_TABLE}_privcal_acl (
|
||||
c_uid VARCHAR(256) NOT NULL,
|
||||
c_object VARCHAR(256) NOT NULL,
|
||||
c_role VARCHAR(80) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE SOGo_${USER_TABLE}_contacts_acl (
|
||||
c_uid VARCHAR(256) NOT NULL,
|
||||
c_object VARCHAR(256) NOT NULL,
|
||||
c_role VARCHAR(80) NOT NULL
|
||||
);
|
||||
|
||||
EOF
|
||||
shift
|
||||
done
|
|
@ -1,30 +0,0 @@
|
|||
--
|
||||
-- (C) 2004-2005 SKYRIX Software AG
|
||||
--
|
||||
|
||||
CREATE TABLE %s_quick (
|
||||
c_name VARCHAR(256) NOT NULL PRIMARY KEY, -- the filename
|
||||
uid VARCHAR(256) NOT NULL,
|
||||
startdate INT NOT NULL,
|
||||
enddate INT NOT NULL,
|
||||
title VARCHAR(1000) NOT NULL,
|
||||
participants VARCHAR(100000) NOT NULL, -- the CNs of the participants
|
||||
isallday INT NULL,
|
||||
iscycle INT NULL, -- client needs to fetch to resolve
|
||||
classification INT NOT NULL,
|
||||
status INT NOT NULL,
|
||||
isopaque INT NOT NULL,
|
||||
location VARCHAR(256) NULL,
|
||||
orgmail VARCHAR(256) NULL,
|
||||
partmails VARCHAR(100000) NOT NULL, -- the emails of the participants
|
||||
partstates VARCHAR(256) NOT NULL, -- the status of each participant
|
||||
sequence INT NULL -- the iCal sequence
|
||||
);
|
||||
|
||||
CREATE TABLE %s_blob (
|
||||
c_name VARCHAR(256) NOT NULL PRIMARY KEY, -- the filename
|
||||
c_content VARCHAR(100000) NOT NULL, -- the BLOB
|
||||
c_creationdate INT NOT NULL, -- creation date
|
||||
c_lastmodified INT NOT NULL, -- last modification (UPDATE)
|
||||
c_version INT NOT NULL, -- version counter
|
||||
);
|
|
@ -1,35 +0,0 @@
|
|||
--
|
||||
-- (C) 2004 SKYRIX Software AG
|
||||
--
|
||||
|
||||
DROP TABLE SOGo_helge_privcal_quick;
|
||||
DROP TABLE SOGo_helge_privcal;
|
||||
|
||||
CREATE TABLE SOGo_helge_privcal_quick (
|
||||
c_name VARCHAR(256) NOT NULL PRIMARY KEY, -- the filename
|
||||
uid VARCHAR(256) NOT NULL,
|
||||
startdate INT NOT NULL,
|
||||
enddate INT NOT NULL,
|
||||
cycleenddate INT NULL, -- enddate for cyclic events
|
||||
title VARCHAR(1000) NOT NULL,
|
||||
cycleinfo VARCHAR(1000) NULL, -- property list with cycle infos
|
||||
participants VARCHAR(100000) NOT NULL, -- the CNs of the participants
|
||||
isallday INT NULL,
|
||||
iscycle INT NULL, -- client needs to fetch to resolve
|
||||
ispublic INT NOT NULL,
|
||||
status INT NOT NULL,
|
||||
isopaque INT NULL,
|
||||
location VARCHAR(256) NULL,
|
||||
orgmail VARCHAR(256) NULL,
|
||||
partmails VARCHAR(100000) NOT NULL, -- the emails of the participants
|
||||
partstates VARCHAR(256) NOT NULL, -- the status of each participant
|
||||
sequence INT NULL -- the iCal sequence
|
||||
);
|
||||
|
||||
CREATE TABLE SOGo_helge_privcal (
|
||||
c_name VARCHAR(256) NOT NULL PRIMARY KEY, -- the filename
|
||||
c_content VARCHAR(100000) NOT NULL, -- the BLOB
|
||||
c_creationdate INT NOT NULL, -- creation date
|
||||
c_lastmodified INT NOT NULL, -- last modification (UPDATE)
|
||||
c_version INT NOT NULL -- version counter
|
||||
);
|
|
@ -1,9 +0,0 @@
|
|||
# $Id$
|
||||
|
||||
INSERT INTO sogo_folder_info
|
||||
(c_path,c_path1,c_path2,c_path3,c_path4,c_foldername,c_location,c_folder_type)
|
||||
VALUES ('/', '', NULL, NULL, NULL, '', '', 'Container');
|
||||
|
||||
INSERT INTO sogo_folder_info
|
||||
(c_path,c_path1,c_path2,c_path3,c_path4,c_foldername,c_location,c_folder_type)
|
||||
VALUES ('/Users', 'Users', NULL, NULL, NULL, 'Users', '', 'Container');
|
|
@ -1,27 +0,0 @@
|
|||
-- $Id$
|
||||
--
|
||||
-- (C) 2004 SKYRIX Software AG
|
||||
--
|
||||
|
||||
DROP TABLE SOGo_test_contacts_quick;
|
||||
DROP TABLE SOGo_test_contacts_blob;
|
||||
|
||||
CREATE TABLE SOGo_test_contacts_quick (
|
||||
c_name VARCHAR(256) NOT NULL PRIMARY KEY, -- the filename
|
||||
givenname VARCHAR(256),
|
||||
cn VARCHAR(256),
|
||||
sn VARCHAR(256),
|
||||
l VARCHAR(256),
|
||||
mail VARCHAR(256),
|
||||
o VARCHAR(256),
|
||||
ou VARCHAR(256),
|
||||
telephonenumber VARCHAR(256)
|
||||
);
|
||||
|
||||
CREATE TABLE SOGo_test_contacts_blob (
|
||||
c_name VARCHAR(256) NOT NULL PRIMARY KEY, -- the filename
|
||||
c_content VARCHAR(100000) NOT NULL, -- the BLOB
|
||||
c_creationdate INT NOT NULL, -- creation date
|
||||
c_lastmodified INT NOT NULL, -- last modification (UPDATE)
|
||||
c_version INT NOT NULL -- version counter
|
||||
);
|
|
@ -1,13 +0,0 @@
|
|||
INSERT INTO SOGo_folder_info
|
||||
( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername,
|
||||
c_location, c_quick_location, c_folder_type )
|
||||
VALUES
|
||||
( '/Users/helge/Calendar',
|
||||
'Users',
|
||||
'helge',
|
||||
'Calendar',
|
||||
NULL,
|
||||
'Calendar',
|
||||
'http://postgres:@agenor-db:5432/test/SOGo_helge_privcal',
|
||||
'http://postgres:@agenor-db:5432/test/SOGo_helge_privcal_quick',
|
||||
'Appointment' );
|
|
@ -1,13 +0,0 @@
|
|||
INSERT INTO SOGo_folder_info
|
||||
( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername,
|
||||
c_location, c_quick_location, c_folder_type )
|
||||
VALUES
|
||||
( '/Users/test.et.di.cete-lyon/Contacts',
|
||||
'Users',
|
||||
'test.et.di.cete-lyon',
|
||||
'Contacts',
|
||||
NULL,
|
||||
'Contacts',
|
||||
'http://postgres:@agenor-db:5432/test/SOGo_test_contacts_blob',
|
||||
'http://postgres:@agenor-db:5432/test/SOGo_test_contacts_quick',
|
||||
'Contact' );
|
|
@ -1,70 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Usage: generate-folderinfo-sql-for-users user1 [user2] [user3] [...]
|
||||
#
|
||||
|
||||
DB_USER="sogo"
|
||||
DB_PASS="sogo"
|
||||
DB_HOST="192.168.0.4"
|
||||
DB_PORT="5432"
|
||||
DB_NAME="sogo"
|
||||
TIMEZONE="Canada/Eastern"
|
||||
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
USER_ID=$1
|
||||
USER_TABLE=`echo $USER_ID | tr -s [:punct:] _`
|
||||
cat << EOF
|
||||
--
|
||||
-- (C) 2004 SKYRIX Software AG
|
||||
--
|
||||
-- TODO:
|
||||
-- add a unique constraints on path
|
||||
|
||||
DELETE FROM SOGo_folder_info WHERE c_path2 = '${USER_ID}';
|
||||
|
||||
INSERT INTO SOGo_folder_info
|
||||
( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername,
|
||||
c_location, c_quick_location, c_folder_type )
|
||||
VALUES
|
||||
( '/Users/${USER_ID}',
|
||||
'Users',
|
||||
'${USER_ID}',
|
||||
NULL,
|
||||
NULL,
|
||||
'${USER_ID}',
|
||||
'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_user_folder',
|
||||
'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_user_folder_quick',
|
||||
'Container' );
|
||||
|
||||
INSERT INTO SOGo_folder_info
|
||||
( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername,
|
||||
c_location, c_quick_location, c_folder_type )
|
||||
VALUES
|
||||
( '/Users/${USER_ID}/Calendar',
|
||||
'Users',
|
||||
'${USER_ID}',
|
||||
'Calendar',
|
||||
NULL,
|
||||
'Calendar',
|
||||
'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_privcal',
|
||||
'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_privcal_quick',
|
||||
'Appointment' );
|
||||
|
||||
INSERT INTO SOGo_folder_info
|
||||
( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername,
|
||||
c_location, c_quick_location, c_folder_type )
|
||||
VALUES
|
||||
( '/Users/${USER_ID}/Contacts/personal',
|
||||
'Users',
|
||||
'${USER_ID}',
|
||||
'Contacts',
|
||||
'personal',
|
||||
'Contacts',
|
||||
'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_contacts',
|
||||
'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_contacts_quick',
|
||||
'Contact' );
|
||||
|
||||
EOF
|
||||
shift
|
||||
done
|
|
@ -1,57 +0,0 @@
|
|||
--
|
||||
-- (C) 2004 SKYRIX Software AG
|
||||
--
|
||||
|
||||
DELETE FROM SOGo_helge_privcal
|
||||
WHERE c_name = 'BD91C454-AA65-11D8-84CA-000D93C1A604';
|
||||
DELETE FROM SOGo_helge_privcal_quick
|
||||
WHERE c_name = 'BD91C454-AA65-11D8-84CA-000D93C1A604';
|
||||
|
||||
|
||||
|
||||
INSERT INTO SOGo_helge_privcal
|
||||
( c_name, c_creationdate, c_lastmodified, c_version, c_content )
|
||||
VALUES (
|
||||
'BD91C454-AA65-11D8-84CA-000D93C1A604',
|
||||
928383,
|
||||
928383,
|
||||
1,
|
||||
'BEGIN:VEVENT
|
||||
DURATION:PT1H
|
||||
ATTENDEE;CN="Elke Bethke";DIR="addressbook://B156F3F0-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:E.Bethke@Sachsen-Anhalt-Lotto.de
|
||||
ATTENDEE;CN="Erik Doernenburg";DIR="addressbook://B15FCB0F-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:erik@x101.net
|
||||
ATTENDEE;CN="Christian Schnelle";DIR="addressbook://B1418D4E-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:cs@enervation.de
|
||||
ATTENDEE;CN="Chris Herrenberger";DIR="addressbook://B14A390C-9CFD-11D8-8561-000D93C1A604:ABPerson":invalid:nomail
|
||||
ATTENDEE;CN="Horst Parplies";DIR="addressbook://B19B47E5-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:horst.parplies@freenet.de
|
||||
ATTENDEE;CN="Imdat Solak";DIR="addressbook://B19EDB62-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:imdat@solak.de
|
||||
ATTENDEE;CN="Jens Enders";DIR="addressbook://B1B6819F-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:jens.enders@skyrix.com
|
||||
ATTENDEE;CN="Jens Muenster";DIR="addressbook://B1BBA42E-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:jens.muenster@skyrix.com
|
||||
ATTENDEE;CN="Laurent Pierre";DIR="addressbook://9337C270-A825-11D8-B930-000D93C1A604:ABPerson":mailto:laurent.pierre@linagora.com
|
||||
ATTENDEE;CN="Marcel Weiher";DIR="addressbook://B1F9BB12-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:marcel@metaobject.co
|
||||
DTSTAMP:20040520T140002Z
|
||||
UID:BD91C454-AA65-11D8-84CA-000D93C1A604
|
||||
SEQUENCE:3
|
||||
STATUS:CONFIRMED
|
||||
DTSTART;TZID=Europe/Berlin:20040814T120000
|
||||
SUMMARY:SIZE EVENT
|
||||
X-WR-ITIPSTATUSML:UNCLEAN
|
||||
END:VEVENT
|
||||
'
|
||||
);
|
||||
|
||||
INSERT INTO SOGo_helge_privcal_quick
|
||||
( c_name, uid, startdate, enddate, title, participants, isallday, iscycle,
|
||||
location, partmails, sequence )
|
||||
VALUES (
|
||||
'BD91C454-AA65-11D8-84CA-000D93C1A604',
|
||||
'BD91C454-AA65-11D8-84CA-000D93C1A604',
|
||||
1092477600,
|
||||
1092481200,
|
||||
'SIZE EVENT',
|
||||
'Elke Bethke, Erik Doernenburg, Christian Schnelle, Chris Herrenberger, Horst Parplies, Imdat Solak, Jens Enders, Jens Muenster, Laurent Pierre, Marcel Weiher',
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
'E.Bethke@Sachsen-Anhalt-Lotto.de, erik@x101.net, cs@enervation.de, nomail, horst.parplies@freenet.de, imdat@solak.de, jens.enders@skyrix.com, jens.muenster@skyrix.com, laurent.pierre@linagora.com, marcel@metaobject.com',
|
||||
1
|
||||
);
|
|
@ -1,63 +0,0 @@
|
|||
-- $Id$
|
||||
--
|
||||
-- (C) 2004 SKYRIX Software AG
|
||||
--
|
||||
|
||||
DELETE FROM SOGo_helge_privcal
|
||||
WHERE c_name = 'BD91C454-AA65-11D8-84CA-000D93C1A604';
|
||||
DELETE FROM SOGo_helge_privcal_quick
|
||||
WHERE c_name = 'BD91C454-AA65-11D8-84CA-000D93C1A604';
|
||||
|
||||
|
||||
|
||||
INSERT INTO SOGo_helge_privcal
|
||||
( c_name, c_creationdate, c_lastmodified, c_version, c_content )
|
||||
VALUES (
|
||||
'BD91C454-AA65-11D8-84CA-000D93C1A604',
|
||||
928383,
|
||||
928383,
|
||||
1,
|
||||
|
||||
'BEGIN:VEVENT
2
|
||||
DURATION:PT1H
|
||||
ATTENDEE;CN="Elke Bethke";DIR="addressbook://B156F3F0-9CFD-11D8-8561-000
|
||||
D93C1A604:ABPerson":mailto:E.Bethke@Sachsen-Anhalt-Lotto.de
|
||||
ATTENDEE;CN="Erik Doernenburg";DIR="addressbook://B15FCB0F-9CFD-11D8-8561
|
||||
-000D93C1A604:ABPerson":mailto:erik@x101.net
|
||||
ATTENDEE;CN="Christian Schnelle";DIR="addressbook://B1418D4E-9CFD-11D8-8
|
||||
561-000D93C1A604:ABPerson":mailto:cs@enervation.de
|
||||
ATTENDEE;CN="Chris Herrenberger";DIR="addressbook://B14A390C-9CFD-11D8-8
|
||||
561-000D93C1A604:ABPerson":invalid:nomail
|
||||
ATTENDEE;CN="Horst Parplies";DIR="addressbook://B19B47E5-9CFD-11D8-8561-
|
||||
000D93C1A604:ABPerson":mailto:horst.parplies@freenet.de
|
||||
ATTENDEE;CN="Imdat Solak";DIR="addressbook://B19EDB62-9CFD-11D8-8561-000
|
||||
D93C1A604:ABPerson":mailto:imdat@solak.de
|
||||
ATTENDEE;CN="Jens Enders";DIR="addressbook://B1B6819F-9CFD-11D8-8561-000
|
||||
D93C1A604:ABPerson":mailto:jens.enders@skyrix.com
|
||||
ATTENDEE;CN="Jens Muenster";DIR="addressbook://B1BBA42E-9CFD-11D8-8561-00
|
||||
0D93C1A604:ABPerson":mailto:jens.muenster@skyrix.com
|
||||
ATTENDEE;CN="Laurent Pierre";DIR="addressbook://9337C270-A825-11D8-B930-
|
||||
000D93C1A604:ABPerson":mailto:laurent.pierre@linagora.com
|
||||
ATTENDEE;CN="Marcel Weiher";DIR="addressbook://B1F9BB12-9CFD-11D8-8561-0
|
||||
00D93C1A604:ABPerson":mailto:marcel@metaobject.co
|
||||
DTSTAMP:20040520T140002Z
|
||||
UID:BD91C454-AA65-11D8-84CA-000D93C1A604
|
||||
SEQUENCE:3
|
||||
STATUS:CONFIRMED
|
||||
DTSTART;TZID=Europe/Berlin:20040618T160000
|
||||
SUMMARY:SIZE EVENT
|
||||
X-WR-ITIPSTATUSML:UNCLEAN
|
||||
END:VEVENT
|
||||
'
|
||||
);
|
||||
|
||||
INSERT INTO SOGo_helge_privcal_quick
|
||||
( c_name, uid, startdate, enddate, title, participants )
|
||||
VALUES (
|
||||
'BD91C454-AA65-11D8-84CA-000D93C1A604',
|
||||
'BD91C454-AA65-11D8-84CA-000D93C1A604',
|
||||
8928837,
|
||||
8929000,
|
||||
'SIZE EVENT',
|
||||
'Elke Bethke, Erik Doernenburg, Christian Schnelle, Chris Herrenberger, Horst Parplies, Imdat Solak, Jens Enders, Jens Muenster, Laurent Pierre, Marcel Weiher'
|
||||
);
|
|
@ -1,33 +0,0 @@
|
|||
--
|
||||
-- (C) 2004 SKYRIX Software AG
|
||||
--
|
||||
|
||||
DELETE FROM SOGo_test_contacts_blob
|
||||
WHERE c_name = 'contact_donald';
|
||||
DELETE FROM SOGo_test_contacts_quick
|
||||
WHERE c_name = 'contact_donald';
|
||||
|
||||
INSERT INTO SOGo_test_contacts_blob
|
||||
( c_name, c_creationdate, c_lastmodified, c_version, c_content )
|
||||
VALUES (
|
||||
'contact_donald',
|
||||
928383,
|
||||
928383,
|
||||
1,
|
||||
'{
|
||||
givenName="Donald"; cn="Donald Duck"; sn="Duck";
|
||||
l="Entenhausen";
|
||||
mail="dd@entenhausen.com";
|
||||
o="Geldspeicher AG";
|
||||
ou="Support";
|
||||
telephoneNumber="0190-1234567";
|
||||
}'
|
||||
);
|
||||
|
||||
INSERT INTO SOGo_test_contacts_quick
|
||||
( c_name, givenname, cn, sn, l, mail, o, ou, telephoneNumber )
|
||||
VALUES (
|
||||
'contact_donald', 'Donald', 'Donald Duck', 'Duck', 'Entenhausen',
|
||||
'dd@entenhausen.com', 'Geldspeicher AG', 'Support',
|
||||
'0190-1234567'
|
||||
);
|
|
@ -89,22 +89,26 @@
|
|||
acquire: (BOOL) _flag
|
||||
{
|
||||
id obj;
|
||||
BOOL isPut;
|
||||
|
||||
isPut = NO;
|
||||
/* first check attributes directly bound to the application */
|
||||
obj = [super lookupName:_key inContext:_ctx acquire:NO];
|
||||
if (!obj)
|
||||
{
|
||||
if ([[[_ctx request] method] isEqualToString: @"PUT"])
|
||||
{
|
||||
obj = [[SOGoContactGCSEntry alloc] initWithName: _key
|
||||
inContainer: self];
|
||||
[obj autorelease];
|
||||
}
|
||||
{
|
||||
if ([_key isEqualToString: @"PUT"])
|
||||
isPut = YES;
|
||||
else
|
||||
obj = [SOGoContactGCSEntry objectWithName: _key
|
||||
inContainer: self];
|
||||
}
|
||||
else
|
||||
obj = [self lookupContactWithId: _key];
|
||||
}
|
||||
if (!obj)
|
||||
obj = [NSException exceptionWithHTTPStatus:404 /* Not Found */];
|
||||
// if (!(obj || isPut))
|
||||
// obj = [NSException exceptionWithHTTPStatus:404 /* Not Found */];
|
||||
|
||||
// #if 0
|
||||
// if ([[self ocsFolder] versionOfContentWithName:_key])
|
||||
|
|
|
@ -183,6 +183,22 @@
|
|||
|
||||
/* actions */
|
||||
|
||||
// - (id) lookupName:
|
||||
// {
|
||||
// SoSelectorInvocation *invocation;
|
||||
// NSString *name;
|
||||
|
||||
// name = [NSString stringWithFormat: @"%@:", [_key davMethodToObjC]];
|
||||
|
||||
// invocation = [[SoSelectorInvocation alloc]
|
||||
// initWithSelectorNamed: name
|
||||
// addContextParameter: YES];
|
||||
// [invocation autorelease];
|
||||
|
||||
// return invocation;
|
||||
|
||||
// }
|
||||
|
||||
- (id) PUTAction: (WOContext *) _ctx
|
||||
{
|
||||
WORequest *rq;
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#import <GDLContentStore/GCSFolderManager.h>
|
||||
#import <GDLContentStore/GCSFolder.h>
|
||||
#import <GDLContentStore/GCSFolderType.h>
|
||||
#import <SaxObjC/XMLNamespaces.h>
|
||||
|
||||
#import "SOGoPermissions.h"
|
||||
#import "SOGoFolder.h"
|
||||
|
@ -228,7 +229,7 @@ static NSString *defaultUserID = @"<default>";
|
|||
if ([self respondsToSelector: @selector (groupDavResourceType)])
|
||||
{
|
||||
groupDavCollection = [NSArray arrayWithObjects: [self groupDavResourceType],
|
||||
@"http://groupdav.org/", @"G", nil];
|
||||
XMLNS_GROUPDAV, nil];
|
||||
rType = [NSArray arrayWithObjects: @"collection", groupDavCollection, nil];
|
||||
}
|
||||
else
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
superclass = "SOGoObject";
|
||||
protectedBy = "Access Object";
|
||||
defaultRoles = {
|
||||
"Access Object" = ( "Owner", "AuthorizedSubscriber" );
|
||||
"Access Object" = ( "Owner", "ObjectViewer" );
|
||||
};
|
||||
};
|
||||
SOGoFolder = {
|
||||
|
@ -41,8 +41,8 @@
|
|||
protectedBy = "Access Object";
|
||||
defaultRoles = {
|
||||
"Change Images And Files" = ( "Owner", "ObjectEditor" );
|
||||
"WebDAV Access" = ( "Owner", "AuthorizedSubscriber" );
|
||||
"Access Object" = ( "Owner", "AuthorizedSubscriber" );
|
||||
"WebDAV Access" = ( "Owner", "ObjectViewer" );
|
||||
"Access Object" = ( "Owner", "ObjectViewer" );
|
||||
"Access Contents Information" = ( "Owner", "ObjectViewer" );
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue