Sorry, i push send button too early :-)
My user have a personal calendar with no permission setted.
I should modify all calendars (150+) to PublicViewer"and
“ConfidentialDandTViewer” for All Authenticated users.
I must do it batch, and every new user should have this by default!
Il 27/12/2011 10:42, Alessio Fattorini ha scritto:
All personal calendar shoud have "PublicViewer"and
“ConfidentialDandTViewer” for All Authenticated users.
how can i change permissions batch?
I can't use administration ACL panel, i have 150 user!
They have default role (no role) now
I can't use SOGoCalendarDefaultRoles because
Any mysql update query?
I'm searching ML and i have find this solution by Chris Hobbos, Is it
the only one?
How can i have that future new users have that permission enabled by
default? Chris do you have enable this?
> In case anyone finds themselves in the same boat, here's how I fixed it:
1) get a list of users and their acl tables from the database. I used
the mysql interactive command line:
select c_path2, c_acl_location from sogo_folder_info where
c_foldername='Personal Calendar' into outfile 'useracls.txt';
2) Feed the resultant file into the following perl script:
#!/usr/bin/perl
foreach (<>) {
($user, $mysql) = split /\t/;
($a, $b, $c, $d, $table) = split (/\//, $mysql);
chomp $table;
print "insert into $table (c_uid, c_object, c_role) values
('<default>', '/$user/Calendar/personal', 'PublicDAndTViewer');\n";
}
I ran this as: aclfix.pl < useracls.txt > acl.sql
3) Finally, load the .sql script into mysql:
mysql -A -u root -p sogo < acl.sql
--
Alessio Fattorini ([email protected])
nethesis srl - Via degli Olmi 16/4 - 61100 Pesaro (PU)
tel. +39 0721 405516 - fax +39 0721 268147
www.nethesis.it - [email protected]
--
[email protected]
https://inverse.ca/sogo/lists