[gnome-control-center] color: Do not allow the user to set default a profile they cannot access
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] color: Do not allow the user to set default a profile they cannot access
- Date: Wed, 14 Sep 2011 10:13:03 +0000 (UTC)
commit 240a13f11013d206ef73ac1db7a260753fb87efb
Author: Richard Hughes <richard hughsie com>
Date: Wed Sep 14 11:11:27 2011 +0100
color: Do not allow the user to set default a profile they cannot access
panels/color/cc-color-panel.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c
index 3301838..b700de1 100644
--- a/panels/color/cc-color-panel.c
+++ b/panels/color/cc-color-panel.c
@@ -1508,6 +1508,16 @@ gcm_prefs_device_set_model_by_iter (CcColorPanel *prefs, CdDevice *device, GtkTr
goto out;
}
+#if CD_CHECK_VERSION(0,1,13)
+ /* ignore profiles from other user accounts */
+ if (!cd_profile_has_access (profile))
+ {
+ g_warning ("%s is not usable by this user",
+ cd_profile_get_filename (profile));
+ goto out;
+ }
+#endif
+
/* autogenerated printer defaults */
if (cd_device_get_kind (device) == CD_DEVICE_KIND_PRINTER &&
cd_profile_get_filename (profile) == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]