Homepage | Products | OX Knowledge Base | Support | Try Now | Contact | Company
OX Logo
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2013
    Posts
    4

    Lightbulb Overide certain settings for all users

    Hi there, we use OX community for internal mail, we want the following settings locking / defaulting for all users:

    Allow html formatted E-Mails? = Yes
    Block pre-loading of externally linked images? = No

    How can we set these settings for all users? I read something about maybe using the /opt/open-xchange/etc/groupware/settings property files but i dont know where to start?

    Or, are these user preferences stored in the mySQL database? if so, can we change the settings there? (Which table / field / value)

    The reason we're doing this is that some of our users are reporting that these settings are changing without them doing anything - is there a process within OX that might be changing these settings? (for security reasons perhaps?)

    Please help - this is driving us nuts.

    Regards

    Jordon

  2. #2
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    3,695

    Default

    Hi Jordon,

    these settings are stored at a gigantic JSON string which is located at the database (table user_setting). It's highly dangerous to modify these strings at the DB since the UI won't load if there is any syntax error. You can pre-configure a working string by using createuser --addguipreferences when creating the user.

    Greetings
    Martin

  3. #3
    Join Date
    Jan 2013
    Posts
    4

    Default

    Cheers Martin

    If that's the case can i assume addguipreferences can be used in conjunction with /changeuser?

    If so, can we create a new user, tweak their settings as desired through the GUI then pop into mysql and copy the resulting JSON string, we can then use /changeuser --addguipreferences to set all users to use that JSON string? Will that work / is that what you meant?

    If so, can you confirm which parts of the JSON string are responsible for these settings:

    Allow html formatted E-Mails? = Yes
    Block pre-loading of externally linked images? = No

    As a rough guess i'd assume html formatted is the red one below below - but i'm not sure on the" block pre-loading of external images":

    {
    "categories":{
    "local":[

    ]
    },
    "effects":{
    "fading":false,
    "global":false,
    "hover":{
    "speed":3,
    "contacts":true,
    "calendar":true,
    "mail":false,
    "infostore":true,
    "tasks":true,
    "portal":true
    }
    },
    "menu":{
    "menuiteration":2
    },
    "global":{
    "minicalendar":{
    "expanded":false
    },
    "expert_tree":1,
    "landing_page":{
    "module":"portal"
    },
    "confirmpopup":true,
    "autorefresh":10,
    "save":1
    },
    "contacts":{
    "cardsToViewPerColumn":"auto",
    "gridsort":"asc",
    "view":"contacts/cards"
    },
    "calendar":{
    "allfolders":true,
    "starttime":8,
    "custom":{
    "numberofappointments":3,
    "countdays":3
    },
    "workweek":{
    "numberofappointments":2,
    "countdays":5,
    "startday":1
    },
    "views":{
    "team":"workweek",
    "calendar":"workweek",
    "list":"workweek",
    "view":"calendar",
    "shared":true
    },
    "day":{
    "numberofappointments":4
    },
    "view":"calendar/calendar/workweek",
    "default_reminder":15,
    "endtime":18,
    "teamview":{
    "workingTimeOnly":true
    },
    "interval":30
    },
    "mail":{
    "htmlmessage":true,
    "editor_featureset":2,
    "notifyacknoledge":true,
    "auto_save_drafts":3,
    "autocomplete":true,
    "showname":false,
    "select_first_message":true,
    "view":"mail/hsplit/unthreaded",
    "formatmessage":"ALTERNATIVE",
    "fullmailheader":true,
    "signatures":[

    ]
    },
    "infostore":{
    "fullsplitheader":null,
    "view":"infostore/split"
    },
    "tasks":{
    "gridsort":"asc",
    "fullsplitheader":null,
    "view":"tasks/split",
    "interval":30
    },
    "wizard":{
    "firstrun":false,
    "launchOnStart":false
    },
    "portal":{
    "internalcontents":[
    {
    "header":"Calendar",
    "params":{
    "limit":5
    },
    "module":"calendar",
    "visible":true,
    "adj":{
    "x":1,
    "y":0
    },
    "external":false
    },
    {
    "header":"Contacts",
    "params":{
    "limit":5
    },
    "module":"contacts",
    "visible":false,
    "adj":{
    "x":2,
    "y":1
    },
    "external":false
    },
    {
    "header":"InfoStore",
    "params":{
    "limit":5
    },
    "module":"infostore",
    "visible":true,
    "adj":{
    "x":0,
    "y":0
    },
    "external":false
    },
    {
    "header":"Tasks",
    "params":{
    "limit":5
    },
    "module":"tasks",
    "visible":true,
    "adj":{
    "x":1,
    "y":1
    },
    "external":false
    }
    ],
    "externalcontents":[

    ]
    },
    "tree":{
    "ox-sidepanel-foldertree/1":{
    "state":{
    "9":true,
    "22":true,
    "15":true,
    "3":true,
    "2":true,
    "1":true,
    "10":true
    }
    },
    "ox-sidepanel-infostore-tree/1":{
    "state":{
    "9":true,
    "24":true,
    "10":true
    }
    },
    "select-folder-popup-contacts/1":{
    "state":{
    "22":true,
    "1":true
    }
    },
    "select-folder-popup-distribution-list/1":{
    "state":{
    "1":true
    }
    }
    }
    }
    Regards

    Jordon

  4. #4
    Join Date
    Jan 2013
    Posts
    4

    Default

    Sorry for double post

    We've changed "Allow html formatted E-Mails" tickbox via the GUI and the JSON string doesnt change - it remains "htmlmessage":true even when it's false on the GUI - look like that value is stored somewhere else?

    We did a mysql dump whilst a user had "Allow html formatted E-Mails = unticked", we then ticked it for that user and did another dump - there was no changes in the JSON strings at all, the only thing to change was the bits column in user_setting_mail???? (it increased by 1) - for experiment we then changed it back to unticked, the bit column reverted back to the first dump (i.e. it decreased by 1)??

    Is the "Allow html formatted E-Mails" stored in the bit column in some way???

    Regards

    Jordon
    Last edited by Gorgemead; 01-09-2013 at 07:23 PM.

  5. #5
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    3,695

    Default

    Hi,

    please note that this string gets saved if you hit "Save" at settings and/or logout. You may want to use http://oxpedia.org/wiki/index.php?title=Gui_path as a reference.

    Also note that you always need to set the full string when using it with create/changeuser. Some settings that affect the backend are stored at separate places of the "user_settings_*" tables. This JSON string contains only configuration that's directly used by the web interface at the browser. For example, since mails are processed by the backend before sending them to the UI, the flag for allowing HTML mail is a server stetting. It would be utter dangerous to pass HTML content to a HTML interface and modify that content there.

    If you need further and detailed help on setting up a pre-configured environment for your company or customers you may want to evaluate our professional services offerings as well.

    Greetings
    Martin
    Last edited by Martin Heiland; 01-09-2013 at 07:56 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •