From 8618a4bc3463113e517321861860ecfaa6e77f2c Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sat, 8 Sep 2012 01:15:04 +0200 Subject: [PATCH] =?UTF-8?q?Ne=20pas=20forcer=20les=20param=C3=A8tres=20pou?= =?UTF-8?q?r=20les=20membres=20du=20groupe=20admins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- root/usr/share/mozilla-mcd/firefox.php | 33 +++++++---- root/usr/share/mozilla-mcd/thunderbird.php | 89 ++++++++++++++++-------------- 2 files changed, 70 insertions(+), 52 deletions(-) diff --git a/root/usr/share/mozilla-mcd/firefox.php b/root/usr/share/mozilla-mcd/firefox.php index 3896611..fb70afc 100644 --- a/root/usr/share/mozilla-mcd/firefox.php +++ b/root/usr/share/mozilla-mcd/firefox.php @@ -20,6 +20,15 @@ if(isset($_SERVER['QUERY_STRING']) && preg_match('/^.+@' . DOMAIN . '$/', $_SERV // user not found exit; } + $pref = FF_PREF; + // Don't lock pref if the user is member of admins + // regardless of the setting + foreach ($user[0]['posixmemberof'] as $group){ + if ($group == 'admins'){ + $pref = 'defaultPref'; + break; + } + } } else { exit; @@ -27,36 +36,36 @@ else { ?> // Disable auto updates -("app.update.enabled", false); -("app.update.auto", false); +("app.update.enabled", false); +("app.update.auto", false); // Extensions -("extensions.installDistroAddons", true); -("extensions.enabledScopes", 13); -("extensions.autoDisableScopes", 2); +("extensions.installDistroAddons", true); +("extensions.enabledScopes", 13); +("extensions.autoDisableScopes", 2); // Disable the "know your rights" message -("browser.rights.3.shown", true); +("browser.rights.3.shown", true); // Home page -("startup.homepage_override_url", ""); -("startup.homepage_welcome_url", ""); +("startup.homepage_override_url", ""); +("startup.homepage_welcome_url", ""); // Do not check for default browser -("browser.shell.checkDefaultBrowser", false); +("browser.shell.checkDefaultBrowser", false); // Disable popup blocker // not that very useful anymore, and blocks legitim popups from SOGo -("dom.disable_open_during_load", false); +("dom.disable_open_during_load", false); // Block 3rd party cookies -("network.cookie.cookieBehavior", 1); +("network.cookie.cookieBehavior", 1); diff --git a/root/usr/share/mozilla-mcd/thunderbird.php b/root/usr/share/mozilla-mcd/thunderbird.php index 0f4e010..4fba2c6 100644 --- a/root/usr/share/mozilla-mcd/thunderbird.php +++ b/root/usr/share/mozilla-mcd/thunderbird.php @@ -19,6 +19,15 @@ if(isset($_SERVER['QUERY_STRING']) && preg_match('/^.+@' . DOMAIN . '$/', $_SERV // user not found exit; } + $pref = TB_PREF; + // Don't lock pref if the user is member of admins + // regardless of the setting + foreach ($user[0]['posixmemberof'] as $group){ + if ($group == 'admins'){ + $pref = 'defaultPref'; + break; + } + } } else { exit; @@ -37,24 +46,24 @@ else { } // Local Account -("mail.account.account1.server", "server1"); -("mail.accountmanager.localfoldersserver", "server1"); -("mail.server.server1.directory-rel", "[ProfD]Mail/Local Folders"); -("mail.server.server1.hostname", "Local Folders"); -("mail.server.server1.name", "Dossiers locaux"); -("mail.server.server1.type", "none"); -("mail.server.server1.userName", "nobody"); +("mail.account.account1.server", "server1"); +("mail.accountmanager.localfoldersserver", "server1"); +("mail.server.server1.directory-rel", "[ProfD]Mail/Local Folders"); +("mail.server.server1.hostname", "Local Folders"); +("mail.server.server1.name", "Dossiers locaux"); +("mail.server.server1.type", "none"); +("mail.server.server1.userName", "nobody"); // SMTP config -("mail.smtp.defaultserver", "smtp1"); -("mail.smtpservers", "smtp1"); -("mail.smtpserver.smtp1.try_ssl", 3); -("mail.smtpserver.smtp1.port", ); -("mail.smtpserver.smtp1.hostname", ""); -("mail.smtpserver.smtp1.username", ""); +("mail.smtp.defaultserver", "smtp1"); +("mail.smtpservers", "smtp1"); +("mail.smtpserver.smtp1.try_ssl", 3); +("mail.smtpserver.smtp1.port", ); +("mail.smtpserver.smtp1.hostname", ""); +("mail.smtpserver.smtp1.username", ""); // Default account is acocunt2 (the personal account) -("mail.accountmanager.defaultaccount", "account2"); +("mail.accountmanager.defaultaccount", "account2"); // Personnal account -("mail.account.account2.server", "server"); -("mail.server.server2.hostname", ""); -("mail.server.server2.name", ""); -("mail.server.server2.port", ); -("mail.server.server2.socketType", 3); -("mail.server.server2.type", "imap"); -("mail.server.server2.userName", ""); +("mail.account.account2.server", "server"); +("mail.server.server2.hostname", ""); +("mail.server.server2.name", ""); +("mail.server.server2.port", ); +("mail.server.server2.socketType", 3); +("mail.server.server2.type", "imap"); +("mail.server.server2.userName", ""); -("mail.identity.id.fullName", ""); -("mail.identity.id.organization", ""); -("mail.identity.id.smtpServer", "smtp1"); -("mail.identity.id.useremail", ""); -("mail.identity.id.valid", true); +("mail.identity.id.fullName", ""); +("mail.identity.id.organization", ""); +("mail.identity.id.smtpServer", "smtp1"); +("mail.identity.id.useremail", ""); +("mail.identity.id.valid", true); defaultPref("mail.identity.id.fcc_folder", "imap://@/Sent"); defaultPref("mail.identity.id.draft_folder", "imap://@/Drafts"); defaultPref("mail.identity.id.stationery_folder", "imap://@/Templates"); @@ -95,20 +104,20 @@ $account++; $id++; } ?> -("mail.account.account2.identities", ""); -("mail.accountmanager.accounts", "account1,account2"); +("mail.account.account2.identities", ""); +("mail.accountmanager.accounts", "account1,account2"); // Disable auto updates -("app.update.enabled", false); -("app.update.auto", false); +("app.update.enabled", false); +("app.update.auto", false); // Extensions -("extensions.installDistroAddons", true); -("extensions.enabledScopes", 13); -("extensions.autoDisableScopes", 2); +("extensions.installDistroAddons", true); +("extensions.enabledScopes", 13); +("extensions.autoDisableScopes", 2); // Spam -("mail.adaptivefilters.junk_threshold", 500); +("mail.adaptivefilters.junk_threshold", 500); // Checks IMAP folders defaultPref("mail.check_all_imap_folders_for_new", true); @@ -125,14 +134,14 @@ defaultPref("mail.imap.expunge_threshold_number", 100); // Adds the domain from your email address to the // recipients email address if it doesn't have a domain -("mail.enable_autocomplete", true); +("mail.enable_autocomplete", true); // Hide useless messages -("mail.ui.show.migration.on.upgrade", false); -("app.update.showInstalledUI", false); -("browser.startup.homepage_override.mstone", "ignore"); -("mailnews.start_page_override.mstone", "ignore"); -("mail.rights.version", 1); +("mail.ui.show.migration.on.upgrade", false); +("app.update.showInstalledUI", false); +("browser.startup.homepage_override.mstone", "ignore"); +("mailnews.start_page_override.mstone", "ignore"); +("mail.rights.version", 1);