From de547a8ea07eaeebdb7980cc99b72fa19df7232e Mon Sep 17 00:00:00 2001 From: Jimmy Huang Date: Tue, 11 Mar 2014 13:32:04 -0700 Subject: [PATCH] Installs polkit rule to allow Settings to change locale - Temporarily work around for TIVI-2645 - Installs new polkit rule to allow user "app" to change locale without authentication. Change-Id: I7c483419d51992133acd868b45b16b5ff5a298e2 Signed-off-by: Jimmy Huang --- packaging/99-locale.rules | 7 +++++++ packaging/Settings.spec | 4 ++++ 2 files changed, 11 insertions(+) create mode 100644 packaging/99-locale.rules diff --git a/packaging/99-locale.rules b/packaging/99-locale.rules new file mode 100644 index 0000000..f3c2b04 --- /dev/null +++ b/packaging/99-locale.rules @@ -0,0 +1,7 @@ +/* Temporary work around for TIVI-2645, allow user "app" to set locale */ +polkit.addRule(function(action, subject) { + if (action.id == "org.freedesktop.locale1.set-locale" && + subject.user == "app") { + return polkit.Result.YES; + } +}); diff --git a/packaging/Settings.spec b/packaging/Settings.spec index cbf1d25..5fa67dd 100644 --- a/packaging/Settings.spec +++ b/packaging/Settings.spec @@ -6,6 +6,7 @@ Group: Applications/Web Applications License: Apache-2.0 URL: http://www.tizen.org2 Source0: %{name}-%{version}.tar.bz2 +Source1: 99-locale.rules BuildRequires: zip BuildRequires: desktop-file-utils Requires: bluetooth-frwk-core @@ -27,6 +28,8 @@ make wgtPkg %install rm -rf %{buildroot} +mkdir -p %{buildroot}%{_datadir}/polkit-1/rules.d +install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/polkit-1/rules.d %make_install %post @@ -40,3 +43,4 @@ wrt-installer -un ODBQpKvkS1.Settings %files %defattr(-,root,root,-) /opt/usr/apps/.preinstallWidgets/Settings.wgt +%{_datadir}/polkit-1/rules.d/99-locale.rules -- 2.7.4