We are in the final stages of going live with SOGo and have a couple
puddles to jump, one of which is public calendars.
Our current thought is to have departmental calendars created / owned by
department heads office assistants , this in itself causes an issue when
the user leaves leaving the calendar owned by no one. The calendar could
be exported / imported via SOGo WebUI except once the user has left it
would be very difficult to access the account (LDAP Auth). Another
option is to create a caladm account and have all the public calendars
created / owned by that user, this in itself has its pros and cons as well.
Looking into moving calendars I started poking around SOGo code/ PSQL DB
and came up with a few SQL commands that could be used to move a
calendar from User-A to User-B. Using the commands in our dev setup I
can reliably move calendars between users, but hesitant to mess with our
production DB directly and would like some feedback / insight regarding
the following SQL commands and if their is a better way to accomplish
this (sogo-tool?)
update sogo_folder_info set
c_path2='postgresql://******:**********@127.0.0.1:5432/sogo/sogoUSER_B003420da128'
where c_foldername='CAL-NAME';
update sogo_folder_info set c_path2='USER_B' where c_foldername='CAL-NAME';
update sogo_folder_info set
c_location='postgresql://******:**********@127.0.0.1:5432/sogo/sogoUSER_B003420da128'
where c_foldername='CAL-NAME';
update sogo_folder_info set
c_quick_location='postgresql://******:**********@127.0.0.1:5432/sogo/sogoUSER_B003420da128_quick'
where c_foldername='CAL-NAME';
update sogo_folder_info set
c_acl_location='postgresql://******:**********@127.0.0.1:5432/sogo/sogoUSER_B003420da128_acl'
where c_foldername='CAL-NAME';
update sogoUSER_B003420da128_acl set
c_object='/USER_B/Calendar/6504-4FD0E580-1-389A65C0';
* Validate updates
select * from sogo_folder_info where c_foldername = 'CAL-NAME';
*renaming tables is not required but keeps the DB clean and uniformed
alter table sogoUSER_A003420da128 rename to sogoUSER_B003420da128;
alter table sogoUSER_A003420da128_acl rename to sogoUSER_B003420da128_acl;
alter table sogoUSER_A003420da128_quick rename to
sogoUSER_B003420da128_quick;
*Could recreate pkey's as well, but that should not be required
Thoughts?
-Ron
--
[email protected]
https://inverse.ca/sogo/lists