General discussion on installation and configuration of SOGo

Text archives Help


Re: [SOGo] Set all personal calendar to


Chronological Thread 
  • From: Francis Lachapelle < >
  • To:
  • Subject: Re: [SOGo] Set all personal calendar to
  • Date: Mon, 2 Jan 2012 11:43:57 -0500

Hi Alessio

On 2011-12-27, at 4:56 AM, Alessio Fattorini wrote:

> 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';

The user can change the folder name. I suggest this SQL query instead :

select c_path2, c_acl_location from sogo_folder_info where c_path3 =
'Calendar' and c_path4 = 'personal' 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

--

:: +1.514.755.3640 :: http://www.inverse.ca
Inverse :: Leaders behind SOGo (http://sogo.nu) and PacketFence
(http://packetfence.org)



  • Re: [SOGo] Set all personal calendar to, Francis Lachapelle, 01/02/2012

Archive powered by MHonArc 2.6.18.

Top of page