Re: [SOGo] sogo-tool, modify user preferences

2019-07-10 Thread "Christian M. Jensen"

hi.

This is kinda fun to figure out. Fist do not copy paste my commands 
chack they match your enviroment. and skip step 6.


I have done the following. and it works to a point, the only issue now 
is that all is set up, BUT use ad...@example.com is not subscribed... 
how ever if i run (sogo-tool manage-acl subscribe 
meetingr...@example.com Calendar/personal ad...@example.com 
'["PublicModifier"]') again as the last step it all fall into place. 
(perhaps it's related to changing the name of the Calendar when 
'user-preferences set settings' is run.) but i do not have to much time 
to invest at the moment.


NOTE* i feel this is hacky at best maybe some one from the dev team can 
confirm or deny this. And i hope this will get you further.



1. Get the device we are using at this moment.

 ~# sogo-tool manage-eas listdevices ad...@example.com

2. validate that you are seeing the expected folders [NO share at this 
point] (i do this, you do not need to. BUT the more info/validation of 
entries the better.)


 ~# sogo-tool manage-eas listfolders ad...@example.com 
{DEVICE-ID-FROM-LISTDEVICES}


3. add and subscribe

 ~# sogo-tool manage-acl add meetingr...@example.com Calendar/personal 
ad...@example.com'["PublicModifier"]'
 ~# sogo-tool manage-acl subscribe meetingr...@example.com 
Calendar/personal ad...@example.com '["PublicModifier"]'


4. Check the shares of meetingr...@example.com:Calendar/personal.

 ~# sogo-tool manage-acl get meetingr...@example.com Calendar/personal 
ad...@example.com


 * output of 'manage-acl get' if empty results NO shares is setup, 
anf you need to start over with step 3
 * 2019-07-10 10:56:57.265 sogo-tool[17342:17342] Rights for 
meetingr...@example.com ["PublicModifier"]

 *

5. Update the user settings.

 5.1. get all user settings for key=Calendar.

 ~# sogo-tool user-preferences get settings ad...@example.com Calendar

 5.2. update the output (FULL OUTPUT) with your changes. (for me i took 
the output of 5.1 and added/appended/merged the new calendar settings 
*{,"FolderSynchronize": {}}* )
 ** NOTE: 'sogo-tool user-preferences set settings ad...@example.com 
Calendar -f /path/to/file.json' can be used to load the full json from a 
file.


 ~# sogo-tool user-preferences set settings ad...@example.com Calendar '{
    "FoldersOrder": ["1ADD-5CFD4880-1-41A25A80", "personal"],
    "View": "weekview",
    "FolderColors": {"ad...@example.com:Calendar\/personal": 
"#AA"},
    "FolderDisplayNames": 
{"meetingr...@example.com:Calendar\/personal": "Meetingroom"}
    "NotifyOnPersonalModifications": 
{"ad...@example.com:Calendar\/personal": 0},

    "EventsFilterState": "view_next7",
    "SelectedList": "eventsListView",
    "FreeBusyExclusions": {"ad...@example.com:Calendar\/personal": 0},
    "NotifyOnExternalModifications": 
{"ad...@example.com:Calendar\/personal": 1},
    "NotifyUserOnPersonalModifications": 
{"ad...@example.com:Calendar\/personal": 0},

    "TasksSortingState": ["status", "1"],
    "TasksFilterState": "view_incomplete",
    "PreventInvitationsWhitelist": {},
    "FolderSynchronize": {"ad...@example.com:Calendar\/personal": 
1, "meetingr...@example.com:Calendar\/personal": 1},

    "EventsSortingState": ["start", "1"]
}'


6. [WRONG DO NOT RUN UNLESS YOU GOT BACKUP.] i added this to showcase an 
issue when manipulating the user setting.


 ~# sogo-tool user-preferences set settings ad...@example.com Calendar 
'{"FolderSynchronize": {"meetingr...@example.com:Calendar\/personal": 1}}'
 --- NO NO NO... all my settings for my own calendars and the 
shared calendars are gone.. crying a little. 'sogo-tool manage-acl 
get'==not found back to step 3.


 This happens to be simple we are setting the value of the key 
'*Calendar*' so we need to set the full json/dictionary when 
manipulating this setting.


--
Hilsen/Regards
Christian M. Jensen


On 04-07-2019 15:41, Alexey Dunaev (k...@keir.ru) wrote:

Dear SOGo community,
I'm trying to share a calendar from one mailbox to other users with 
availability through MS Outlook via ActiveSync connection.


I've done with sharing using command
~# sogo-tool manage-acl add meetingr...@example.com 
 Calendar/personal ad...@example.com 
 [\"PublicModifier\"]
~# sogo-tool manage-acl subscribe meetingr...@example.com 
 Calendar/personal ad...@example.com 
 [\"PublicModifier\"]


And now i should add option 'Synchronize (Microsoft Enterprise 
ActiveSync)' with sogo-tool (still unchecked on this screenshot 
http://0x0.st/z2jy.png)
I didn't find exact option names (by google or sogo sources) and have 
tried something like this (of cource it's wrong):
~# sogo-tool user-preferences set settings ad...@example.com 
 '{"Calendar": {"FolderSynchronize": 
{"meetingr...@example.com:Calendar\/personal" 

[SOGo] sogo-tool, modify user preferences

2019-07-04 Thread Alexey Dunaev
Dear SOGo community,
I'm trying to share a calendar from one mailbox to other users with
availability through MS Outlook via ActiveSync connection.

I've done with sharing using command
~# sogo-tool manage-acl add meetingr...@example.com Calendar/personal
ad...@example.com [\"PublicModifier\"]
~# sogo-tool manage-acl subscribe meetingr...@example.com Calendar/personal
ad...@example.com [\"PublicModifier\"]

And now i should add option 'Synchronize (Microsoft Enterprise ActiveSync)'
with sogo-tool (still unchecked on this screenshot http://0x0.st/z2jy.png)
I didn't find exact option names (by google or sogo sources) and have tried
something like this (of cource it's wrong):
~# sogo-tool user-preferences set settings ad...@example.com '{"Calendar":
{"FolderSynchronize": {"meetingr...@example.com:Calendar\/personal"
: 1}}}'
after i've inspect mysql database with user settings and changing
preferences via web interface but have no luck.
Also i've tried a 'hack' - via my external script i've added
'FolderSynchronize' parameter into mysql sogo_user_profile table,
c_settings row, exactly (except an order of parameters in array) like SOGo
doing this after parameter checked in web-interface, but this doesn't help.

Can someone explain right syntax to use sogo-tool user-preferences or any
other ways how to enable ActiveSync Synchronize from 'admin' side, without
necessity to user side actions?

Thank you.

P.S. even built-in help message with command 'sogo-tool user-preferences
get defaults janedoe SOGoLanguage' for my mailbox returns "Value for key
"SOGoLanguage" not found in settings"
-- 
users@sogo.nu
https://inverse.ca/sogo/lists

[SOGo] sogo-tool, modify user preferences

2019-06-24 Thread Alexey Dunaev

Dear SOGo community,

I'm trying to share a calendar from one mailbox to other users with 
availability through MS Outlook via ActiveSync connection.


I've done with sharing using command
~# sogo-tool manage-acl subscribe meetingr...@example.com 
Calendar/personal ad...@example.com [\"PublicModifier\"]


And now i should add option 'Synchronize (Microsoft Enterprise 
ActiveSync)' with sogo-tool (still unchecked on this screenshot 
http://0x0.st/z2jy.png)
I didn't find exact option names (by google or sogo sources) and have 
tried something like this:
~# sogo-tool user-preferences set settings ad...@example.com 
'{"Calendar": {"FolderSynchronize": 
{"meetingr...@example.com:Calendar\/personal": 1}}}'
after i've inspect mysql database with user settings and changing 
preferences via web interface but have no luck.


Can someone explain right syntax to use sogo-tool user-preferences?

P.S. even built-in help message with command 'sogo-tool user-preferences 
get defaults janedoe SOGoLanguage' for my mailbox returns "Value for key 
"SOGoLanguage" not found in settings"


--
users@sogo.nu
https://inverse.ca/sogo/lists